Wiris

Documentation / MathType

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

    • WirisQuizzes

      • LearningLemur

        • CalcMe

          • MathPlayer

            • Store FAQ

              • VPAT for the electronic documentation

                • MathFlow

                  • BF FAQ

                    • Miscellaneous

                      • Wiris Integrations

                        • Home
                        • MathType
                        • Technical documentation
                        • MathType 7
                        • 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?

                        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

                        Empowering STEM education

                        MathType

                        • Office Tools
                        • LMS
                        • XML
                        • HTML

                        WirisQuizzes

                        Learning Lemur

                        Integrations

                        Solutions

                        • Education
                        • Publishing houses – platforms and interactive
                        • Publishing houses – Print and digital
                        • Technical writers

                        Pricing

                        Downloads

                        Blog

                        • Success stories

                        About us

                        • Careers
                        • Partnership

                        Contact Us

                        Contact Sales

                        European union (European Regional Development Fund) and 1EdTech (TrustEd Apps Certified)
                        • Cookie Policy
                        • Terms of Use
                        • Privacy Policy / GDPR
                        • Student Data Privacy
                        • Compliance
                        • Cookie Settings

                        © Wiris 2026

                        Expand