How can I import an exam or assignment from Word into LaTeX?

I'm sorry I wont be able to provide any answer other than: "Don't do it!"

Other than using some of the converters that you and other people have suggested, which may give you a reasonable place to start, there is really no satisfactory solution to convert an existing Word document into a LaTeX one. This is difficult to implement, and for a good reason. Word and LaTeX have two completely different approaches at describing and encoding documents. Word (as most people use it) stores formatting information while LaTeX encodes the "logical structure" of a document (which then gets translated to TeX formatting instructions while compiling). Trying to get a LaTeX document out of a Word document is somewhat similar to trying to obtain a C++ program from it's binary: You can do it, but the results wont be pretty.

You are better off taking a printout of your assignments and typing the whole thing yourself in LaTeX. Of course you can copy/paste large bodies of text, but for equations there is nothing better than typing them yourself. If you do this for a while, and show your beautiful documents to your teachers and colleagues, you might be even able to convince them to switch to LaTeX all together.

LaTeX is not a format to store pretty documents, it is a fully-fledged system to create those documents.


I recommend docx2tex. Against your criteria:

  • Recognizes MS Word numbered lists and outlines (I, 1, a, i, etc.).
    • Yes, although it doesn't try to keep enum types;
  • Is faster than copy-pasting the text of each question into, say, the exam document class, writing the equations, and drawing the diagrams. This is what I do right now. Not too bad, but it adds half an hour to every assignment.
    • It is automatic, provided it recognises all of your OOXML markup (it doesn't handle everything).
  • Makes better looking documents than the original Word document. I'd like to do a little evangelism here.
    • It gives pretty easy-to-read, vanilla Latex. I don't call that beautiful, but it's easier to beautify than Word.
  • Includes support for equations, tables, and images.
    • Yes. It converts included images to .eps files; I'm not sure what quality that gives you with included SVG files.
  • Can import both .doc and .docx files. Saving the .docx as a .doc is not acceptable, as it renders the equations as bitmaps. Saving the .doc as .docx might be acceptable.
    • Only docx files. Provided you have Word 2007 or later, this shouldn't be a problem.

Issues: It's abandonware, not updated since November 2008. It only supports the DVI toolchain. It's native to Windows, being a C#/.NET3 based technology, and works very well there; away from Windows, it supposedly it works with Mono, although the last time I tried, about 18 months ago, it did not work. It's docx/OOXML-only technology. although since conversion of RTF/.doc to .docx is very well-behaved, this should not be a problem.

The TUG 2008 talk announcing the technology was recorded by River Valley TV.


In my experience Pandoc does a decent job of converting from MS Word 2016 files (.docx) to LaTeX. After installation on OSX El Capitan, I ran the following command to convert my MS Word file:

pandoc -f docx -t latex -o out.tex in.docx

Granted you'll still have to make some edits to match the original, but it is way better than starting afresh and it's free. Also, it supports OSX, Windows and Linux.