How to Copy an Equation from MathType to Lyx

Recently, I’ve been using Latex with Lyx instead of Microsoft Word to format my dissertation and research papers. I find managing the formatting to be much easier, and the layout is guaranteed to be consistent throughout the document. However, much of what I have done previously was in Word, and I often want to transfer math equations I wrote previously in MathType over to Lyx rather than rewriting them from scratch.

While the method is somewhat of a nuisance because of the terrible way MathType handles Latex, it is certainly possible, and can often be faster than rewriting an equation.

  1. In Microsoft Word, select the MathType equation you want to copy over to Lyx.
  2. Click the MathType tab at the top of Word. Click Toggle Tex. This will convert the MathType equation image into Latex code.
  3. Copy the Latex code. In my example, I get:
  4. Insert a new math formula field in Lyx. Here is the tricky part. You cannot simply paste the Latex code you have copied directly into this formula field. Otherwise, it will show up as text, not a formatted equation, like so:
  5. MathType adds the \[ characters to the beginning and the \] characters to the end of the Latex code. DELETE these characters before pasting into Lyx. (For multi-line equations, MathType also may surround the Latex code with \begin{align} and \end{align}. These must be deleted too to paste into Lyx properly). In my example, I end up with:
  6. With the extra two characters removed from the beginning and end of the Latex code, the code will paste properly into Lyx:
  7. However, as you can see in the example, MathType inserts extra braces into the Latex code, more than are necessary. These must be removed manually, but at least the majority of the equation formatting is preserved and recognized by Lyx’s formula editor. Once removed, you are done!

This method was tested using MathType 6.5 and Lyx 1.6.8