Documentation / MathType

  • Demos
  • Visit our website
  • Downloads
  • Contact us
  • MathType

    • Wiris Quizzes

      • Learning Lemur

        • CalcMe

          • MathPlayer

            • Store FAQ

              • VPAT for the electronic documentation

                • MathFlow

                  • BF FAQ

                    • Home
                    • MathType
                    • MathType Office Tools
                    • MathType 7 for Windows and Mac
                    • MathType SDK
                    • MathType SDK

                    Converting equations

                    Reading time: 1min

                    Abstract

                    The purpose of this document is describe how to convert equations from one format to another. It also defines which formats can be converted to which other formats. The .NET sample included in the SDK has code demonstrating most valid combinations of input and output equation format types.

                    The MathType SDK can convert equations from image files, text files and the clipboard to equations of the same or different format. The following are equation formats that ConvertEquations can convert from:

                    • WMF file
                    • GIF file
                    • EPS file
                    • MathML in a text file
                    • TeX in a text file
                    • Clipboard text
                    • Clipboard Embedded Object (copy a MathType equation to the clipboard from within Microsoft Word)

                    The following are equation formats that ConvertEquations can convert to:

                    • WMF file
                    • GIF file
                    • EPS file
                    • MathML in a text file*
                    • TeX in a text file*
                    • Base 64 MTEF in a text file

                    * ConvertEquations will convert to any text equation format that MathType has a translator for.

                    Any of the input equation formats can be converted to any of the output equation formats, though special processing is required for those formats that do not contain embedded MTEF, which include any textual representation of an equation that does not have embedded MTEF. WMF, GIF and EPS if they contain MathType equations, should contain MTEF. See the conversion matrix table in the API documentation for MTXFormEqn.

                    Sample code

                    The sample code is located in the DotNET folder of the SDK, and contains two sets of classes to manage input and output equations. These classes are primarily concerned with managing the appropriate parameter values for the MTXFormEqn SDK API. The input equations also need to obtain MTEF for those equations that do not have it. The output equations also write text equations to text files, and take a string parameter with the name of the translator to use (this is the translator file name as it appears in the Translators folder in the MathType installation folder).

                    Once input and output equation objects have been created, the equation can be converted by calling the Convert method on the ConvertEquation class. The Convert method first obtains the equation from a file if needed and then obtains the MTEF, again if needed. The MTXFormEqn API is then called, and the equation is saved to a file as appropriate.

                    Before running the sample you'll need to either create the folders returned by the two helper methods in the Program class; GetInputFolder and GetOutputFolder, or change these routines to return folders of your preference.

                    <a><button>Back to MathType SDK intro page</button></a>

                    Was this article helpful?

                    Yes
                    No
                    Give feedback about this article

                    Related Articles

                    • Using MathType with other applications and websites
                    • General techniques for using MathType with other applications and websites
                    • Using MathType with MathJax-enabled applications and websites

                    Converting equations

                    Abstract Sample code

                    Making people’s STEM work more meaningful

                    MathType

                    • MathType for Office Tools
                    • MathType for Mac
                    • MathType for Microsoft 365
                    • MathType for Google Workspace
                    • MathType for LMS
                    • MathType for XML Editors
                    • Arabic notation
                    • Our products accessibility
                    • MathType is online

                    WirisQuizzes

                    Learning Lemur

                    Solutions for Education

                    • Blackboard Learn
                    • Brightspace by D2L
                    • Canvas
                    • Google Classroom
                    • Moodle
                    • Schoology

                    Solutions for Publishing Houses

                    Solutions for Technical Writers

                    Solutions for Chemistry

                    Integrations

                    • HTML Editors
                    • MathType in WordPress

                    Pricing

                    Company

                    Careers

                    Blog

                    Contact Us

                    Buy Now

                    Plugin Downloads

                    © Wiris 2025

                    • Cookie Preferences
                    • Cookie Policy
                    • Terms of Use
                    • Privacy Policy / GDPR
                    • Student Data Privacy
                    • Compliance
                    • Powered by Helpjuice
                    Expand