MathType Software Development Kit

The MathType SDK is primarily for developers who want to explore the advanced capabilities of MathType. The SDK also includes documentation about equation formats and other related information. The MathType SDK is available to developers who:

  • want to customize the special commands that MathType installs into Microsoft Word
  • want documentation for MathType's DLL interface
  • want to modify MathType's translators or create their own translators
  • want to extend MathType's knowledge of fonts and characters
  • want to make their product "equation-friendly" by aligning imported equations with the baseline of surrounding text

The MathType SDK is available for both Windows and Mac and has been updated to the latest releases, 6.9 for Windows, 6.7 for Mac.


The following Word Templates are supplied with the SDK:

  • Windows 32-bit:
    • MathType Commands 6 For (Windows - Word 2003 and earlier)
    • MathType Commands 6 For Word.dotm (Windows - Word 2007)
    • MathType Commands 6 For Word 2010.dotm (Windows - Word 2010)
  • Windows 64-bit:
    • MathType Commands 6 For Word 2010.dotm
  • Mac:
    • MathType
  • Additional SDK Functions:
    • (32-bit)
    • (64-bit)
  • Sample Templates:

The following sample applications are supplied with the SDK:

The MathType API allows you to call functions used by the MathType Commands For Word and MathType itself. These are located in MathPage.WLL and MT6.DLL on Windows.

View the MathType API Documentation.

Additional features and settings for MathPage are described on the following pages:

This manual describes how to modify or create new translators for MathType 4.0 or later. It describes the Translator Definition Language (TDL) used to specify translators and how to make new or modified translators available to MathType.

View the Translator Programmer's Manual.

Starting with version 4.0, MathType has much more knowledge of the fonts and characters it works with than did previous versions. This results in improved formatting, translation into TeX, EPS, and improvements in many other areas. Most of this additional knowledge is in the form of tables built into the code. However, it can be external to the program, allowing it to be expanded and corrected without having to change the application itself. Also, more sophisticated users can customize MathType and we (or they) can then make the results available to other users.

To find out how to make MathType aware of your fonts and the characters they contain, see Expanding MathType's Font and Character Information.

MathType's knowledge of fonts and characters is built around the concept of character encoding (also called character set). An encoding is simply a mapping from a set of integers to characters. For example, ASCII is an encoding with around 200 characters each assigned an integer between 0 and 255. Unicode is another encoding with thousands of characters, covering all the languages of the world, each assigned a number between 0 and 65,535.

MathType represents characters internally using the MTCode encoding. MTCode is a superset of the Unicode encoding that uses Unicode's Private Use Area to represent mathematical characters that are not part of Unicode proper. MathType also assigns an encoding to each mathematical font it makes use of. Using a font's encoding, MathType knows the identity of every character in the font. It uses this information in many ways: to calculate spacing between characters and to translate to TeX and MathML, for example.

To view MathType's encoding tables, see the following pages on our website (not included in SDK due to large number of GIFs):

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.

Although MTEF is not the most friendly medium for defining equations, there have been so many requests for this information, we decided to publish it anyway. We must warn the reader that it is not an easy format to understand and, more importantly, MathType is not at all forgiving in its processing of it. This means that if you send MathType MTEF with errors, it might crash. At a minimum, you will get an equation with formatting problems. Also, it is a binary format. This means that you can't use character strings to represent equations and it makes creating MTEF a little harder with programming languages like Visual Basic.

In addition to MTEF MathType places MathML in all the file formats in which it can save equations, as well as placing it on the clipboard whenever a MathType equation is placed there.

MathType uses its built-in MathML 2.0 (namespace attr) translator to generate the MathML for any MathType equation being saved to a file or placed on the clipboard. If for any reason the translator is missing, or has been modified the MathML output by MathType will either be missing, or subject to the changes made to the translator.

MathType and Equation Editor equation objects and files contain information that word processing, page layout, and other programs can use to automatically align the baseline of inline equation objects with their surrounding text. The following notices will provide you with the information needed to extract this data.

EGO (Edit Graphic Object) is a Mac protocol that employs AppleEvents to implement editing of graphical objects (e.g. equations) embedded in an application's documents. It is similar to the object embedding features of Microsoft’s OLE but EGO is much simpler to implement and more broadly supported among Mac applications. The EGO Specification gives a Mac programmer the information needed to add EGO support to their application. It also contains details regarding the EGO support in MathType and Equation Editor.