Embed LaTeX math equations into Microsoft Word

You should be able to cut and paste mathematics from your web browser to Word (or any of the Micorsoft Office suite). Unfortunately at present you have to make a small edit but any text editor will do for that.

Given

x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}

Make a small html file that looks like

<!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>

$$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$$

</body>
</html>

View that in a web browser and select "show MathML as/MathML Code" from the right menu:

Select the MathML text from the popup window.

Normally you can paste MathML in to word but for various reasons you need to give Word a hint in this case, so first paste it into a text editor and add the line

<?xml version="1.0"?>

to the start:

enter image description here

Then cut out the edited text and paste it into Word (any version since 2007).

enter image description here

Note the result is a fully editable Word Math Zone, using scalable fonts, not an image.

I used MathJax in a web browser for the initial TeX to MathML conversion as it is the easiest to set up, there are other alternatives. Also, to make it simple, I described the process in terms of cutting and pasting, which works well for one or two expressions but clearly not if you are converting thousands, however the process can be automated in various ways.


If you're going completely free/open source, then I guess dropping MS Word for something like OpenOffice Writer might also be considered. For this, there's OOoLaTeX. From the OOoLaTeX SourceForge project webpage:

OOoLatex is a set of macros designed to bring the power of LaTeX into OpenOffice. It contains two main modules: the first one, Equation, allows to insert LaTeX equations into Writer and Impress documents as png or emf images while the second one, Expand, can be used for simpler equations to expand LaTeX code into appropriated symbol characters and insert them as regular text.

This should work as a cross-platform alternative.


Back to MS Word, a number of work-arounds exist using MS Powerpoint. Copy-and-paste the resulting equation (from Powerpoint) across the Office Suite.

The first is via TeX4PPT. The maintainer(s) suggest it provides an alternative to TeXPoint that is faster:

TeX4PPT is designed following the philosophy of TeXPoint, to enable PowerPoint to typeset sentences and equations using the power of TeX. It differs from TeXPoint in that it uses a native DVI to PowerPoint converter, providing extremely fast conversion. Additionally, the result is set using native truetype fonts under windows, providing the highest fidelity.

TeX4PPT seems to be a little lagging in up-to-date support, since "a compatible version for PP2007 will be forthcoming" (from the website).

The second is via Iguanatex. From the homepage:

IguanaTex is a PowerPoint plug-in which allows you to insert LaTeX equations into your PowerPoint presentation. It is distributed completely for free.

The third is via MyTeXPoint. From the homepage:

Free simplified version of TeXPoint. Partly compatible with the original TeXPoint. It has integrated screenshot tool to copy equations and pictures right from the screen. Supports Microsoft Powerpoint (tested with version 2007 and 2005). Compatible with Microsoft Office 2010.


If you're stuck with an old version of MS Word (for whatever reason), older - free - versions of TeXPoint still exist. I haven't tested any of the choices listed below, but it's worth a shot:

  • Office 2002
  • Office 2003
  • All versions of Office

The last version of TeXPoint (v1.5.4) apparently works for all versions, but it is much older the current, non-free version (v3.3.1), so it probably doesn't provide the latest functionality.


For a complete list of formula editors across many platforms and compatibility criteria (including compatibility with TeX), consider viewing the Wikipedia entry on formula editors.


For the Mac, there is the wonderful LaTexiT application which allows you to quickly generate latex fragments and export them in a variety of formats, including PDF. You can store fragments in libraries, so keeping equations organized isn't too hard. This isn't quite the same as editing them directly from within the Word document, but it's pretty close.

I use this regularly for including LaTeX into Powerpoint (if I'm not using Beamer) and InDesign (which I use for posters.)

I don't know if there's an equivalent program for Windows.