# General techniques for using MathType with other applications and websites

If none of the applications listed on the previous page is what you're using, one of the techniques described below should help when using MathType with other applications and websites.

## Working with Insert Object

Many Windows applications support Object Linking and Embedding (OLE). Most of them have an **Insert Object** command (or an **Object…** command on its Insert menu or elsewhere). If your application doesn't have such a command, look up Object Linking and Embedding or OLE in the index of its user documentation. The Insert Object command brings up a dialog containing a list of all the kinds of objects that may be inserted. Choose "MathType 7.0 Equation" and MathType Desktop will open an equation editing window. Create your equation, close the window when you are done, and the new equation will appear in the document. Any time you want to edit the equation, just double-click it. If your favorite application does not support OLE, request it from the vendor. Most software vendors like to get feedback from their customers, just like we do.

## Copy and paste (or drag and drop)

At its core, a MathType Desktop equation is a graphical image (but a WMF or PICT/PDF vector image, rather than a bitmap image, such as GIF). If your application accepts graphics via the clipboard, you can run MathType from the Windows Start menu or Mac Applications folder, create an equation, and paste it into your application. Your application may also support drag and drop but that will generally give the same result. When using MathType Desktop this way, you don't have to restart it for each new equation. Just leave its editing window open for your entire session. When you need to create a new equation, bring the MathType Desktop window to the front, choose the Select All command on the Edit menu (`Ctrl`+`A`/`⌘`+`A`), hit the Delete key to clear out the last equation, and create your new equation ready to paste. Later, if you need to edit an equation, you can usually use Cut or Copy, then Paste it back into a MathType Desktop editing window. After you make your edits, just copy and paste it over the old one.

### Cut and Copy Preferences dialog

This dialog allows you to specify what kind of information will be placed on the clipboard whenever you use the Cut or Copy commands on the Edit menu, or when you drag & drop an equation from the MathType Desktop editing window. (For the remainder of this topic, when we use the terms cut, copy, and/or paste, the same behavior applies to drag & drop, but we will not explicitly state such.) Normally, Cut or Copy will place a graphic image of the selected part of the equation onto the clipboard, ready to be pasted into a document. However, using the options in this dialog, you can have the selected equation or fragment translated into text in one of the computer languages or for one of the applications or websites for which a translator is available.

#### Equation object (Windows OLE graphic)

Click this option to place an equation object on the clipboard. This is the default and is normally used to transfer equation material between one MathType Desktop window and another, or between a MathType Desktop window and another application, such as a word processor. When you paste an equation into another application's window, how it is handled depends on that application. If the application is OLE-compatible, it will be treated as a new OLE object. If the application is not OLE-compatible, it will be treated as a graphic image.

#### MathML or TeX

MathType Desktop is supplied with several translators that allow equations to be translated into other computer languages, TeX and MathML. Click this option to cause MathType Desktop to translate the selected equation whenever you use the Cut or Copy command.

Use this listbox to choose from one of the translators currently available to MathType. The text of each list item describes the computer language (or variant) that the translator can translate equations into. In addition to the translators that are installed as part of MathType Desktop, there may be other translators available from third-party sources. It is also possible to create your own translator or modify an existing one. See Working with MathML and Working with TeX for information on the translators that are installed with MathType.

**Include translator name in translation**

This option instructs the translator software to place the name of the translator in the translation. This is used by MathType Desktop's integration with Microsoft Word to allow its Convert Equations command to find the equations in the document. If you are using MathType with a TeX application instead of Word, you should leave this option unchecked. Some translators may ignore this option.

**Include MathType data in translation**

This option instructs the translator software to place MathType's equation representation in the translation. This allows the equation to be pasted back into MathType Desktop for later editing and should normally be checked. Some translators may ignore this option.

**Note**

It is possible to paste raw TeX into MathType Desktop, and normally MathType will understand it and produce the equation you want, but be aware that if you clear this option, you

*might not*be able to completely edit the resulting text equation in MathType Desktop, or convert it back to a MathType equation object using Convert Equations in Word. Therefore, you should use care when clearing this option.

#### Equation for application or website

Many applications and websites accept TeX or MathML, but may mark it up in a special way, or with special delimiters. For example, instead of `$\frac{1}{2}$`

, some applications want `[math]\frac{1}{2}[/math]`

. By selecting the appropriate application or website from this list and copying the equation from MathType Desktop, you don't have to worry about specific formats for your favorite applications & sites.

## Working with MathML

Some applications support a standard for using MathML as an exchange format for Copy and Paste (or drag and drop). The type of MathML used is controlled by choosing one of the MathML translators from the Cut and Copy Preferences dialog. There may already exist in MathType's list of translators one specifically tailored to your intended target. If not, by experimenting, you may be able to obtain better results with Copy and Paste.

### MathML translators

MathType Desktop provides output translators for MathML, a recommendation from the World Wide Web Consortium for encoding mathematics for the Web. MathML is a worldwide standard but its implementation is not standard, so there are differences in the support for MathML in other software. Therefore, MathType Desktop includes translators to generate MathML 2.0. These translators are packaged in slightly different ways for the various browsers, browser plug-ins, and software applications that support MathML.

The MathML translators provided with MathType Desktop are:

**MathML 2.0 (m namespace)**

All MathML tags are prefixed with an m: namespace.**MathML 2.0 (namespace attr)**

This translator generates MathML 2.0 using a namespace attribute on each`<html><html><html><html><html><html><html><html><html><html><html><math>`

tag. If you're not sure which of the 3 MathML translators to use, this is the one most likely to work if the others do not.**MathML 2.0 (no namespace)**

This translator generates plain MathML tags with no namespace information.

## Working with TeX

Many web applications that use math represent equations using the TeX typesetting language, because it is easy to type in web forms. However, since there are many dialects and variations of TeX, you will need to choose a compatible MathType translator to use when pasting into such a web application. There may already exist in MathType's list of translators one specifically tailored to your intended target. If not, by experimenting with different TeX translators from the Cut and Copy Preferences dialog you may be able to improve the results of Copy and Paste. Because they only use a basic subset of TeX, the Texvc translators are often good choices.

### TeX translators

TeX is a typesetting language invented in the late 1970's by Donald Knuth, a Stanford computer science professor. Although it is a very powerful document processor, especially for documents containing equations, it also has a steep learning curve. 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.

Here is an example of the TeX language for the quotient rule of differentiation:

`\frac{d\left(\frac fg\right)}{dx}(x)=\frac{g(x)\frac{df}{dx}(x)-f(x)\frac{dg}{dx}(x)}{g^2(x)}`

Here is how the same equation would appear in MathType Desktop:

If you work with TeX, MathType's TeX translators can help you. There are several 'flavors' of TeX, LaTeX being one of the most well-known. MathType Desktop includes translators for several of these different versions, check the Cut and Copy Preferences dialog for the complete list.

### 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 Desktop 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 for inline and display equations, but it works differently. Since TeX is a programming language, the positioning of the equation in the 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 Desktop's Format menu will cause inline delimiters to be used for translation. Otherwise display delimiters will be used.

When using MathType Desktop with Microsoft Word, the Inline Equation property is automatically set when inserting equations via MathType's commands for Word. However, if you later move an equation within your document, you may need to manually update the Inline Equation property for TeX export, or for MathType's Toggle TeX feature in Word.

### Importing TeX equations

While MathType Desktop's TeX translators provide and easy way to export an equation as TeX code, MathType also provides several ways to import a TeX equation.

MathType Desktop imports Texvc, subset of TeX supported by Wikipedia. See the MediaWiki handbook for an explanation of this language.

- You can type Texvc directly into MathType Desktop. See Using TeX language input for details.
- 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. See Toggle TeX for details.

You can import and export Texvc from Wikipedia and other web sites, using copy and paste.

## Working with equation image files

MathType Desktop can also save equations in several graphics formats. For working with desktop publishing applications, Encapsulated PostScript format (EPS) is handy. For putting equations on web pages or working with web-based applications, the GIF format is best. Check with your application's documentation on how to work with graphics files. Sometimes we're asked why MathType doesn't support the JPG format, but the truth is JPG is just not a very good format to use for equation images.

To save a MathType equation as an image file, choose *Save As* from the File menu, and choose the image format from the *Save As Type* pulldown list. When you need to edit an equation, use MathType Desktop's Open command on the File menu to open the file. Once you have made your edits, close the window and save changes when asked.

## Working with web pages

If you're reading web pages with equations, it's good to know there are various techniques for adding math to web pages. Some web authors prefer MathML, some prefer MathJax, others prefer images. So how can you tell which method is being used?

### Identifying math display

The best way to tell how the website displays its math is to point to the math expression and click the right mouse button. On a Mac, you may have to ctrl+click.

#### MathML

By far, most of the web pages using MathML are read either with Firefox or with MathJax. When you click the right mouse button, look for an option to view or copy the MathML. If it's not there, you may have to view the page source. If so, look for something beginning with `<math…`

:

Firefox for Windows | Safari for Mac |

If you're using Firefox, choose the **View MathML Source** command, then copy the code & paste the MathML into MathType Desktop. If you're using another browser that supports MathML and there's not a *View MathML* or *Copy MathML* command, go to the source and copy everything between `<math>`

and `</math>`

. There is likely to be more than one such block though, so be sure to get only one block of MathML.

#### MathJax

All browsers have a common contextual (right-click/ctrl+click) menu for MathJax equations:

MathJax equations may be in LaTeX format, or they may be in MathML format. Either way, by clicking Show Math As, you can copy the code and paste it into MathType Desktop to use the equation in your work. For MathML, choose the *Original MathML* option, not the *MathML Code* one.

#### Images

If you are using Chrome or Safari browsers, the contextual menu will be similar to that shown for Firefox.

Firefox for Windows | Internet Explorer |

To use equations from the web, there are a couple of techniques to try:

- The image may have "alt text" that MathType can use. In fact, most of the usable equation images on the web fall into this category. To use these equations, click and drag it over to MathType Desktop, or select it and copy it, then paste it into MathType Desktop. (It's better to use the
`Ctrl`+`C`/`⌘`+`C`shortcut to copy, rather than to use the right-click menu at this point.) - If that doesn't work and you're using Internet Explorer, right-click the equation and choose Copy from the menu. If you're using any other browser, choose
**Copy Image Location**, Copy image URL, Copy Image Address, or similar command. Paste into MathType Desktop.

If these techniques don't work, the equation isn't usable by MathType. If this capability is important, it may be worthwhile to contact the editor of the website and mention how important it is to you that the equations be in one of the formats mentioned above.