To convert Word equations to LaTeX, run the Word file through Pandoc, or import it into Overleaf, which uses Pandoc: equations made with Word’s own equation editor come out as LaTeX math. Equations made with MathType or the old Equation Editor 3.0 come out as images until you convert them to Word equations in Word, and pictures of equations have to be retyped.
The Pandoc and LaTeX results below come from tests with Pandoc 3.14 and pdfLaTeX in TeX Live 2026, on a test .docx we built with seven Word equations, two equation objects built like the ones MathType and Equation Editor 3.0 insert, and one picture of an equation. The steps inside Word follow Microsoft’s documentation.
Check which kind of equations your Word file has
Word files can hold four kinds of equations, and only the first converts by itself:
| Made with | Stored in the .docx as | What Pandoc gave |
|---|---|---|
| Word’s equation editor (Insert, then Equation) | Office Math (OMML) | LaTeX math |
| MathType | An embedded object, Equation.DSMT4, with a preview image | The preview image, as a .wmf file |
| Equation Editor 3.0, before 2018 | An embedded object, Equation.3, with a preview image | The preview image, as a .wmf file |
| A pasted picture | An image, such as .png | The picture |
In Word, clicking a Word equation opens the Equation tab on the ribbon. On a Mac or Linux, you can count each kind without opening Word, since a .docx file is a zip archive:
unzip -p paper.docx word/document.xml | grep -o '<m:oMath>' | wc -l
unzip -p paper.docx word/document.xml | grep -o 'ProgID="[^"]*"' | sort | uniq -cFor our test file, the first line printed 7, the number of Word equations, and the second printed one Equation.3 and one Equation.DSMT4 object.
Convert Word equations with Pandoc or Overleaf
Pandoc converts Word equations as part of the whole document:
pandoc paper.docx --extract-media=. -o paper.texThe seven Word equations in the test file came out like this:
\(e^{i\pi} + 1 = 0\)
\[x = \frac{- b \pm \sqrt{b^{2} - 4ac}}{2a}\]
\[\overline{x} = \frac{1}{n}\sum_{i = 1}^{n}x_{i}\]
\[\int_{0}^{\infty}{e^{- x^{2}}dx} = \frac{\sqrt{\pi}}{2}\]
\[\sin(\alpha + \beta) = \sin\alpha\cos\beta + \cos\alpha\sin\beta\]
\[A = \begin{bmatrix}
1 & 2 \\
3 & 4
\end{bmatrix}\]
\[\begin{aligned}
y & = (x + 1)^{2} \\
& = x^{2} + 2x + 1
\end{aligned}\]With amsmath loaded, they compiled with pdfLaTeX without errors:

Overleaf’s Word import (New project, then Import, Word document) runs the same conversion. Overleaf’s import page explains that Word stores equations as Office Math, which Pandoc can map to LaTeX. For the text, tables, figures and references, see how to convert Word to LaTeX.
Copy one equation as LaTeX from Word
For a few equations, Word can show an equation’s LaTeX itself. Click the equation, choose LaTeX in the Conversions group of the Equation tab, then choose Convert, Linear, or press Ctrl+Shift+=. Word replaces the equation with its code, which you can copy; Ctrl+= turns it back. Microsoft describes the steps on its page about writing an equation in Word.
Word’s LaTeX is not always standard LaTeX. Microsoft’s page on LaTeX in Word says Word does not support \begin and \end, so a matrix is written \matrix{a & b \\ c & d}. With amsmath, that line stopped with:
! Package amsmath Error: Old form `\matrix' should be \begin{matrix}.Replace it with \begin{bmatrix} a & b \\ c & d \end{bmatrix}, or pmatrix for round brackets.
Get your Word paper converted to LaTeX, equations included
We convert Word papers into your journal’s LaTeX template by hand, rebuilding tables, equations, figures and references, and test every file before delivery. Word to LaTeX conversion starts at $149.
MathType and Equation Editor 3.0 equations
Pandoc cannot read these objects. In our test, each one became only its preview image:
\pandocbounded{\includegraphics[keepaspectratio]{./media/image1.wmf}}pdfLaTeX then stopped with ! LaTeX Error: Unknown graphics extension: .wmf. Convert the objects to Word equations in Word first, then run Pandoc again:
- If the file is a .doc, save it as .docx. The old format cannot hold Word equations.
- In Word for Microsoft 365 or Office 2019 and later, double-click an Equation Editor 3.0 equation, or select it and press Enter.
- Accept the offer to convert it, and all other equations in the file, to Word’s equation format.
- Save the file and convert it with Pandoc.
Microsoft’s page on editing Equation Editor equations gives these steps and says the converter does not support long division, and that fonts or spacing may change slightly. Microsoft’s description of the converter says it converts most MathType objects as well. Equations it cannot convert have to be retyped.
Equations saved as pictures
A picture of an equation holds no math, only pixels. Pandoc keeps it as an image, \includegraphics{./media/image3.png} in our test, which compiles but cannot be edited or searched. Retype each one in LaTeX.
Fix the converted equations
These are the errors the converted file gave in our tests, and the fix for each:
! LaTeX Error: Environment bmatrix undefined.and! Misplaced alignment tab character &.: matrices and aligned equations need\usepackage{amsmath}. Pandoc’s own complete file (-s) loads it; a template may not.! Undefined control sequence.at\pandocbounded: Pandoc wraps some images in this command, which only its own preamble defines. Keep the\includegraphicsinside it and delete the wrapper.! Missing $ inserted.: math code pasted outside math mode, such as LaTeX copied from Word. Put it inside\( \)or\[ \]; see how to fix Missing $ inserted.
Compare each converted equation with the Word file before you submit. For errors outside the equations, see common LaTeX compilation errors.
