Skip NavigationDesign Science: How Science Communicates
Products Solutions Store Support Reference Company View Cart
 
 

MathType Works With TeX

Many products use the TeX typesetting language to represent equations. MathType has extensive TeX import and export capabilities, and can be configured to work well with most TeX-based applications and web sites.

TeX is a typesetting language invented in the late 1970's by Donald Knuth, a Stanford computer science professor. The TeX language is designed to be easy to extend and modify, so in practice, TeX should really be regarded as a whole family of related languages.  Often the differing variants of TeX are called flavors of TeX.  Some of the most widely used flavors are LaTeX and AMSLaTeX, but there are many others, as well as an even larger number of optional extensions.  Indeed, many experienced TeX users tend to use their own personal "macro packages" to define new commands just for their own private use.  This is part of the power and flexibility of TeX.

MathType provides built-in support for a number of common TeX flavors.  However, this generic support may only give partial interoperability with a specific TeX-based application, if that application has further customized or extended the flavors of TeX it supports.  As a consequence, it is often possible to improve interoperability by "tuning" MathType's translation into and out of TeX for that application. 

If one is technically inclined, it is fairly straight forward to customize MathType's TeX translators.  The place to start is the Translator Manual in the MathType SDK, and interested MathType users are encouraged to download the SDK and try.  If that sounds like more than you want to take on yourself, we encourage you to write to us at interop@dessci.com and let us know about the TeX-based applications for which you would most like to see us write translators.

Below is a general overview of using MathType to work with TeX-based applications.

Copying Equations out of MathType using TeX Translators

Although TeX is a very powerful document processor, especially for documents containing equations, it is also difficult to use. You can think of TeX as a sort of programming language for documents. If you don't get the syntax just right, you get "syntax error" instead of a document.  By the same token, because TeX is a language you type using regular alphabetic characters, it is a popular choice for web applications, where it is easy to type in a form.

Here is an example of the TeX language for the quadratic formula (generated by MathType's AMS LaTeX translator):

\[  \frac{{ - b\pm \sqrt {b^2 - 4ac}}}{{2a}} \]

If you work with TeX, MathType's TeX translators can help you. As noted above, there are many 'flavors' of TeX, LaTeX being one of the most well-known. MathType includes translators for several of these different versions. Check the list in the Translators Dialog for the complete list. To access the Translators dialog, choose Translators... from the Preferences menu in MathType.

Once you have chosen a TeX translator from the Translators Dialog, Copy and Paste and Drag and Drop will transfer a TeX expression for the selected equation (in the TeX flavor you have chosen). 

Translating Display and Inline Equations

When an equation appears in a document, it can be displayed inline with surrounding text, or it may be centered in a paragraph by itself. Users of MathType in Microsoft Word will already be familiar with this concept, since MathType's commands for Word use different commands to insert inline and display equations.

TeX also has a notation of inline and display equations, but it works differently. Since TeX is a programming language, the positioning of the equation in document must be specified in the TeX code for the equation. TeX uses special delimiter characters at the beginning and end of an equation to indicate whether it should be an inline or display equation. Different flavors of TeX use different delimiter characters, but the most common are $...$ for an inline equation and \[...\] for a display equation.

You can control which kind of TeX delimiter will be used when translating a MathType equation. Checking the "Inline Equation" property from MathType's Format menu will cause inline delimiters to be used for translation. Otherwise display delimiters will be used.

Importing TeX Equations into MathType

While MathType's TeX translators provide and easy way to export an equation as TeX code, MathType also allows you to paste TeX equations into MathType.  MathType can read Texvc from the clipboard.  MathType has a built-in Texvc translator, and there are no options or preferences for TeX import.

The Texvc language is a subset of  TeX, chosen for maximum compatibility with a variety of TeX flavors.  Nonetheless, many TeX expressions may fail to paste properly into MathType.  Equations containing user defined macros, or making use of non-standard styles or TeX packages are unlikely to properly import into MathType.  For a complete description of Texvc, see the help topic Displaying a formula in the MediaWiki handbook for an explanation of this language.

It may also be useful to keep in mind that MathType supports Texvc input in two other contexts:

  • You can type Texvc directly into MathType.
  • If you use Microsoft Word, you can type Texvc directly into the Word editing area, and toggle back and forth between the Texvc view and the MathType view of the equation.

 

- top of page -
Copyright © 1996-2009 Design Science. All rights reserved.   Contact us | Privacy statement