11 Replies Latest reply on Oct 25, 2013 8:43 AM by MrMathType

    Creating .eps File using Indesign javascript codes

    Velprakash Level 1

      Hi Experts,

              I'm struugling a lot in this issue. Please prove me some advice to achieve this. I want to create a empty .eps file with automation while running ID js codes. I googled a lot to do it. But can't able to find it.

      What I need exactly is, If I run a script, It'll create a file like 1.eps with (no variables, i.e I can add equation variables further when I want) in particular location. If I open it with Mathtype, It've to open as normal.

      what I needed after creating is, shown in below Screenshot.

      needed.gif

      Experts, Advice Plz.

       

      Thanks and Regards,

      K.Velprakash.

        • 1. Re: Creating .eps File using Indesign javascript codes
          [Jongware] Most Valuable Participant

          Velprakash wrote:

                  I'm struugling a lot in this issue. Please prove me some advice to achieve this. I want to create a empty .eps file with automation while running ID js codes. I googled a lot to do it. But can't able to find it.

           

          What can't you find? How to create "an empty file", or "an empty EPS file", or "an empty MathType EPS file"? Save that empty MathType somewhere on a known, fixed location, and then use your "ID js codes" to copy the file to the location where you want it.

           

          Actually, this is bothering me far more:

           

           

          Velprakash wrote:

           

          (no variables, i.e I can add equation variables further when I want)

           

          Are you aware that the EPS part in a MathType EPS file is totally irrelevant for the 'actual' equation as it appears in the MathType Equation editor, and that changing it does not influence the equation? For all practical intents and purposes, the EPS part is just a preview. Maybe you are fluent in MTEF? ("MTEF is MathType's binary equation format. MTEF is embedded in OLE equation objects produced by MathType, as well as in all the file formats in which MathType can save equations.")

          1 person found this helpful
          • 2. Re: Creating .eps File using Indesign javascript codes
            Velprakash Level 1

            Hi Mr. Jongware,

                      Thank you for your kind reply. Actually, What I wish to do is, I want to place a new equation in ID Doc. I'm trying to write a script in js and when running the script, the Math Type.exe have to trigger and after creation and editing the equation, and saving, the saved  eqn(in .eps) have to be placed in the insertionPoint of my Indd file while I start the script. For this only I'm struggling. While mathtype ended, there is no function to place the eqn na!!! That's the pblm. Advice Needed Experts...

             

            I'm out of the city for 2 days. So I take look on this issue on monday only. So don't mind for my late response on monday for ur response.

             

            Thanks and Regards,

            K.Velpakash.

            • 3. Re: Creating .eps File using Indesign javascript codes
              gopaljay78 Level 1

              Hi Velpakash,

               

              Did you got any solution to your request.  Can you share it to me.

               

              Thanks,

              Gopal

              • 4. Re: Creating .eps File using Indesign javascript codes
                MrMathType Level 2

                Not exactly sure why I didn't reply to this a year ago, but for Gopal's benefit, we provide the MathType SDK for free. It contains all the hooks you should need for this type of project. https://www.dessci.com/en/reference/sdk/

                • 5. Re: Creating .eps File using Indesign javascript codes
                  gopaljay78 Level 1

                  Thanks for your reply.

                   

                  I downloaded the Mathtype SDK and found lot of tools related to Word, but find it difficult to get the documents related to EGO. If there is a complete manual for this specificaiton, please direct me to that.

                   

                  I am relatively new to the SDK development. 

                  Could you provide me the details of software/application which is used for development (both in Windows and Mac OS). Can i use Xcode for Mathtype development.

                   

                  Thanks,

                  Gopal

                  • 6. Re: Creating .eps File using Indesign javascript codes
                    gopaljay78 Level 1

                    Can I get any suggesion for my above question.

                     

                    Thanks,

                    Gopal

                    • 7. Re: Creating .eps File using Indesign javascript codes
                      MrMathType Level 2

                      Gopal, sorry for the delay. Our developer with the most knowledge in this area has been out for a few days, but I can say the MathType SDK has been updated to include more doc, and a sample app for working with EGO. If you're using the latest version of the SDK, that should get you where you need to be. I don't know about a full spec of EGO. You can't use Xcode for MathType development.

                      • 8. Re: Creating .eps File using Indesign javascript codes
                        Maria964 Level 1

                        Hi,

                         

                        I have downloaded the SDK just for curiosity (I don't know much about programing) but I can see that the SDK contains an executable called ConvertEquations.exe.

                        I think this can be used to batch convert between several file formats of MathType equations (for example: .wmf to .eps). Am I right?

                        I have created the 2 folders mentioned in the respective doc file (GetInputFolder) and (GetOutputFolder) but I am not able to get ConverEquations.exe to work in Windows 8. (I need to batch convert a lot of wmf MT equations to eps equations).

                         

                        Can you show us how do this?

                         

                        Thank you in advance,

                         

                        Maria

                        • 9. Re: Creating .eps File using Indesign javascript codes
                          MrMathType Level 2

                          This should work in Windows 8. Can you be more specific than "I am not able to get [it] to work"? Are you getting any error messages?

                          • 10. Re: Creating .eps File using Indesign javascript codes
                            Maria964 Level 1

                            Hi, Mr. MathTtype, thank you for your interest.

                            What hapens:

                            If I select the file ConvertEquations.exe with the Windows File Manager and double click on it, nothing hapens (a command windows opens and closes very quickly).

                            If I open a Command Window and navigate to the folder where that executable is and run it with the command prompt, nothing happens. Even if i run it in command prompt with an argument like «?» or «/Help» expecting to find what are the possible arguments to feed to the executable nothing happens too. I am running the executable in this folder:

                             

                            E:\DownloadsW8\MathTypeSDK6.9\DotNET\ConvertEquations\ConvertEquations\bin\Debug>

                             

                            and I have made this 2 subfolders (GetInputFolder) and (GetOutputFolder)

                             

                            We work in a lot a books with maths and a quick batch conversion from MT wmf to MT eps whould be an invaluable plus to our workflow in Indesign. We are doing this conversions using an command language (AutoHotKey) but this solution its not the best one.

                             

                            Thank you in advance,

                            Maria

                            • 11. Re: Creating .eps File using Indesign javascript codes
                              MrMathType Level 2

                              Maria, I watch this InDesign forum every day, and somehow missed your reply from last week. ConvertEquations.exe wasn't intended to be run separately; it was intended as an example of how you can program your own applications to interface with MathType's API.

                               

                              To convert from MT WMF to MT EPS -- are the MT WMFs in Word? If so, that's what the Export Equations command (on the MathType menu in Word) is for.

                               

                              I think it may be best if we continue the discussion by email. Can you email us at support@dessci.com?

                               

                              Thanks,

                              Bob