A-  A  A+ RSS Feed

Deep Thoughts by Robert Felty

thoughts on wordpress, latex, cooking et alia
March 29th, 2009

Converting LaTeX to Microsoft Word with plasTeX and Open Office

Sample of LaTeX document converted to Word
Sample of LaTeX document converted to Word

First of all, any LaTeX user might ask — why would I want to convert beautiful LaTeX into ugly Microsoft Word? The main reason is collaborators who want to use track changes. I recently sent a draft of a paper to some colleagues it two formats – .pdf and .doc. The pdf was formatted beautifully with LaTeX, but if your collaborators are not comfortable with editing a LaTeX file, it is difficult to make comments in pdf files, though there are some options for it (I like Mac OSX’s Preview application).

So when I sent out this latest paper for comments, I decided to send two versions. Converting to Word via copy and paste is very laborious, and not worth the effort. Recently though, I have been using plasTeX to convert LaTeX into html. I know that programs like Open Office can import html, so I decided to try that route to convert into .doc. First I used plasTeX to convert html, and specified a few options to get the output I wanted:

plastex --theme minimal --sec-num-depth 0 --split-level 0 <filename>.tex

By default, this creates a subdirectory called , with an index.html file inside it.

Next I opened a new text document in Open Office, then selected Insert > File, and selected this index.html file. Presto! I had the document, complete with figures, tables, footnotes, and references. It wasn’t formatted as nicely as the pdf, but now my authors could insert their own comments and send it back to me electronically. One last step though. By default Open Office links to external figures instead of embedding them. To override this, select Edit > Links. Then highlight all the links, and click on the button to “break links”. Finally, save the document as a .doc file, and e-mail it to the collaborators as an attachment.

I have to incorporate their comments back into my original LaTeX file, but this is much less painful to me than having to write the whole thing in Word to begin with.

4 Responses to “Converting LaTeX to Microsoft Word with plasTeX and Open Office”

  1. On March 31st, 2009 at 10:16 am
    How does saving programs in an external hard drive or a USB work? | SmarterNights wrote:

    [...] robfelty.com :: Blog :: Archive :: Converting LaTeX to Microsoft … [...]

  2. On July 21st, 2009 at 7:47 am
    r wrote:

    I would have given collaborators the original tex file and ask them to prepend all their comments with per cent (%) on a separate line below the originas content of specific interest.

  3. On July 22nd, 2009 at 4:38 pm
    robfelty wrote:

    Let me know how that goes with collaborators who have never used LaTeX before.

  4. On November 26th, 2009 at 2:04 am
    Rajeev wrote:

    Recently I redesigned my resume in Latex. I liked it very much and thats how I always wanted my resume to look like. Simple, elegant. Since I had lots of publications to put I needed the power of Latex. Unfortunately recruiters do not accept PDF files for some reason, they always insist on Word format. I tried plastex. I am more interested in docbook format or xml. I have no idea how to use XML with Word Or OpenOffice. It requires a style sheet I think. Ultimately I had use Adobe Acrobat Professional to export the PDF to Word. I am still trying it with Plastex though.

Leave a Reply

You can use some basic tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
To get pretty code, use <code lang='php' > (or 'css' or 'perl' or whatever)