# Type math formulas in Microsoft Word the LaTeX way?

I wonder if there is some free solutions for typing math formulas the LaTeX way in Microsoft Word document (Office 2007)?

-
Does the internal formula writer not work for you? It's pretty handy whenever I go to do integrals and/or summations. –  kobaltz Sep 28 '11 at 4:58
It is very slow compared to Latex. –  Tim Sep 28 '11 at 5:46
Wouldn't it be simple to write everything in LaTeX? –  N.N. Sep 28 '11 at 8:55
–  Tobias Kienzler Oct 22 '12 at 13:28

You can use Latex in Word.

It provides macros for Microsoft Word that allow the use of LaTeX input to create equations images in both inline and display modes without having to install any software on the local computer. As far as I know, this is the only free alternative to the paid programs like Aurora and TexPoint.

For Office 2007, go to Latex in Word Project Page on Source Forge, and click on Word 2007 under Files.

LaTeX in Word is a GPL-licensed tool that allows equations to be used in Microsoft Word documents. The client-side of the program is implemented as VBA macros in the document "LaTeXinWord_v_0_3_1.docm" along with instructions. Hence, this file contains the source code, implementation, and documentation.

-

I prefer TeXsword over Latex in Word (http://sourceforge.net/projects/texsword/). It has all the features of Latex in Word, plus gives handling of equation references. And it doesn't require the Internet connection, which I see as a feature not a limitation: MikeTeX isn't that big after all, and having the LaTeX locally allows you typing your document when traveling.

-

The question asked about "typing math formulas in LaTeX way in Microsoft word document (Office 2007)." But the responses and comments to date actually answer a different question -- how to embed an actual LaTeX processor into Word.

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 built 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:

1. Many scientific journals will not accept Word documents with the new equation format -- even if you save as .doc instead of .docx.

2. This doesn't turn Word into LaTeX. It just does the equations themselves, and nothing else. You don't even get equation numbering.

-
Key point is LaTeX style, as usual ms has their own 'best' way of doing things. +1 for the post, it does make it easier if you are stuck with word. –  BAR Oct 1 '13 at 3:59

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>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<title>tex texample</title>
<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>&#x2264;<!-- ≤ --></mo>
<munder>
<mo form="prefix" movablelimits="true">lim</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo stretchy="false">&#x2192;<!-- → --></mo>
<mi mathvariant="normal">&#x221E;<!-- ∞ --></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>&#x2264;<!-- ≤ --></mo>
<munder>
<mo form="prefix" movablelimits="true">lim</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo stretchy="false">&#x2192;<!-- → --></mo>
<mi mathvariant="normal">&#x221E;<!-- ∞ --></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">&#x2192;<!-- → --></mo>
<mi mathvariant="normal">&#x221E;<!-- ∞ --></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">&#x2192;<!-- → --></mo>
<mi mathvariant="normal">&#x221E;<!-- ∞ --></mi>
</mrow>
</munder>
<mfrac>
<mn>1</mn>
<mi>k</mi>
</mfrac>
<mo>=</mo>
<mn>0.</mn>
[/itex]


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:

-

Answer mentioned above is correct but there is a also shortcut builtin which is math auto correct. It is much like LaTeX. By default its inactive but you can activate it and is really helpful if you want to write big equations. For eg if you want to type H2 than you just have to type H_2 etc and many more options are available like for superscript character following caret (^) sign will be converted as superscript. Many such shortcuts are covered in this video or you can simply search for How to insert mathematical equation (like LaTeX) in Ms-Office: Tips and tricks on youtube.

This method will be especially helpful if you are a fast at typing. Moreover it will save your time which is lost while switching between keyboard and mouse and searching proper option in word.

-
Taoyue mentioned that in his answer two years ago, with screenshots. –  Ben Voigt Dec 6 '14 at 0:05