Convert LaTeX documents to .odt or .doc (and vice-versa)

An easy way to convert LaTeX documents to .odt or .doc, as recommended by ohsss at Ubuntu Forums here, is via a command-line program tex4ht. You install it (sudo apt-get install tex4ht) and then issue these commands in your terminal:

$ latex document.tex

$ htlatex document.tex

where document.tex is your LaTeX document. You should now get a document.html file in the same folder. You can open the html file from LibreOffice Writer and save it as .odt or .doc or copy the formatted text into some other document.

For the opposite direction, I previously tried the Word-to-LaTeX Microsoft Word plug-in by GrindEQ which works good and has many options, but you can only use it for a limited number of times free of charge.

Published by

metakermit

Building apps, analysing data at Punk Rock Dev and sharing weird & cool photographs, drawings, music, films, games... More about me here. You can get new blog posts via RSS or follow @metakermit on Twitter where I also announce new stuff.

2 thoughts on “Convert LaTeX documents to .odt or .doc (and vice-versa)”

  1. hi,
    nice solution and good tutorial.
    all fractions get renderes as images, is there a way to get a version where you can edit the output? i used amsmath and \dfrac, could be also theese packages?
    but thanks so far

  2. Glad it helps. Haven’t really used it for formulas personally (only CV-type stuff), but I think you could get to at least the HTML stage with properly rendered equations using MathJax. Here’s a StackExchange thread on that:

    http://tex.stackexchange.com/questions/68916/convert-latex-to-mathjax-html

    I don’t know if you could get further than that, though, as I guess LibreOffice uses some different format for equations. It seems one could at least import them in this MathML format:

    http://stackoverflow.com/questions/10300067/how-to-load-and-mathml-formula-into-libreoffice

Leave a Reply

Your email address will not be published. Required fields are marked *