Type math formulas in Microsoft Word the LaTeX way?
If you are running Office 365 version 1707 or later, the Equation Editor allows you to convert LaTex into the native format. See the first part of this answer.
In older versions of Office, the Equation Editor can understand certain LaTeX components. However, it builds the equation as you go, and you cannot convert an entire LaTeX equation. See the second part of this answer if you are running:
- WinWord 2007, 2010, 2013, and 2016
- MacWord 2011 and 2016
On Office 365 version 1707 or later
-
Put the Equation Editor into LaTeX mode. In the Equation Editor Design ribbon, go to the Conversions group and click LaTeX.
-
Type the LaTeX.
-
Open the Convert dropdown menu and click Current - Professional.
-
The LaTeX will be processed into the Equation Editor's native format.
You can also convert back to LaTeX to edit the equation.
- Open the Convert dropdown menu, and then click Current - Linear.
- The equation is converted back to LaTeX format. Note: This is not your original LaTeX source, because it has been round-tripped through the Equation Editor's internal format.
- Open the Convert dropdown menu, and then click Current - Professional.
You have to use the dropdown menu because the Convert button doesn't toggle automatically between Linear and Professional. It keeps the last-used command.
There are some limitations. For example, the Office 365 Equation Editor does not understand the \begin and \end commands. See the Microsoft documentation for examples and possible workarounds:
- https://support.office.com/en-us/article/Linear-format-equations-using-UnicodeMath-and-LaTeX-in-Word-2e00618d-b1fd-49d8-8cb4-8d17f25754f8
On Office 2007-2016 (Mac Office 2011-2016)
Very few people realize that the built-in equation editor in Word 2007 actually understands LaTeX-style equation entry. Simply insert a new equation, and then type LaTeX into it. As you type, Word will build up a graphical representation of the equation.
Once it appears in the GUI, you can no longer edit it as LaTeX. Word does not have an embedded TeX processor -- it's just doing pattern matching to convert simple LaTeX syntax into the native equation format. You should therefore not expect to get perfect fidelity for super-complex LaTeX equations. However, it's enough for probably anyone but a mathematician, and it's a lot faster than clicking elements with the mouse.
The Word 2007 equation editor also has a linear equation entry format, which is fairly intuitive and does not require familiarity with LaTeX. For example, typing in (a+b)/(c+d)
will result in a nicely-formatted fraction.
Notes:
Many scientific journals will not accept Word documents with the new equation format -- even if you save as .doc instead of .docx.
This doesn't turn Word into LaTeX. It just does the equations themselves, and nothing else. You don't even get equation numbering.
Write your Math formulas in LaTeX → Transform the LaTeX formulas in MathML Code → Copy/Paste the MathML Code in Word (after paste click CTRL and then T). Voila!
EXAMPLE:
Lets take for example this Formula:
This is the LaTeX source Code from the above Formula:
0 \leq \lim_{n\to \infty}\frac{n!}{(2n)!} \leq \lim_{n\to \infty} \frac{n!}{(n!)^2} = \lim_{k \to \infty, k = n!}\frac{k}{k^2} = \lim_{k \to \infty}\frac{1}{k} = 0.
Now open a Editor and put the above source code between the signs $$ $$ like this:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<title>tex texample</title>
</head>
<body>
$$ 0 \leq \lim_{n\to \infty}\frac{n!}{(2n)!} \leq \lim_{n\to \infty} \frac{n!}{(n!)^2} = \lim_{k \to \infty, k = n!}\frac{k}{k^2} = \lim_{k \to \infty}\frac{1}{k} = 0.$$
</body>
</html>
Save the file as .html file and open it with a browser like Chrome.
Right Click on the Formula and Choose Show MathML As → MathML Code.
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mn>0</mn>
<mo>≤<!-- ≤ --></mo>
<munder>
<mo form="prefix" movablelimits="true">lim</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo stretchy="false">→<!-- → --></mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
</mrow>
</munder>
<mfrac>
<mrow>
<mi>n</mi>
<mo>!</mo>
</mrow>
<mrow>
<mo stretchy="false">(</mo>
<mn>2</mn>
<mi>n</mi>
<mo stretchy="false">)</mo>
<mo>!</mo>
</mrow>
</mfrac>
<mo>≤<!-- ≤ --></mo>
<munder>
<mo form="prefix" movablelimits="true">lim</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo stretchy="false">→<!-- → --></mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
</mrow>
</munder>
<mfrac>
<mrow>
<mi>n</mi>
<mo>!</mo>
</mrow>
<mrow>
<mo stretchy="false">(</mo>
<mi>n</mi>
<mo>!</mo>
<msup>
<mo stretchy="false">)</mo>
<mn>2</mn>
</msup>
</mrow>
</mfrac>
<mo>=</mo>
<munder>
<mo form="prefix" movablelimits="true">lim</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
<mo stretchy="false">→<!-- → --></mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
<mo>,</mo>
<mi>k</mi>
<mo>=</mo>
<mi>n</mi>
<mo>!</mo>
</mrow>
</munder>
<mfrac>
<mi>k</mi>
<msup>
<mi>k</mi>
<mn>2</mn>
</msup>
</mfrac>
<mo>=</mo>
<munder>
<mo form="prefix" movablelimits="true">lim</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
<mo stretchy="false">→<!-- → --></mo>
<mi mathvariant="normal">∞<!-- ∞ --></mi>
</mrow>
</munder>
<mfrac>
<mn>1</mn>
<mi>k</mi>
</mfrac>
<mo>=</mo>
<mn>0.</mn>
</math>
Now Copy/Paste the MathML Code in Word 2013 (or 2007) and click sequentially CTRL and then T (Paste Options: keep the text only) or go to the small Ctrl image at the end of the MathML Code you pasted and select the option manually.
This is how the formula looks at the end in Word 2013:
I've created LatexToWordEquation based on answers.
It is a Word AddIn.
The source code I've pushed to Github. Link here
If you prefer you can download the installer directly from here.
Note: This is an active download link that will immediately download the file when you click on it.
How to do it