I tried various converters and combinations, but I obtained the best results with the following procedure.
1) Use htlatex to produce HTML code, with the following options:
htlatex document.tex "xhtml,mathml" " -cunihtf -utf8"
2) Convert the html with pandoc:
pandoc -s document.html -o document.docx
This procedure generates a docx with editable equations and a reasonable typesetting. In particular, getting editable equations is not easy and is not always guaranteed by the other methods. The main drawback of my method is that the figures are converted to raster png files, so the quality is degraded. But, typically, who uses Word is not too much interested into such technical details, so none of my colleagues complained about this problem (or even noticed).
However, there can be some difficulties. Some packages do not work properly, so, if any difficulty is found, a careful debugging must be done in order to find and remove the guilty package. Here is a list of issues I found.
1) The .html file does not display properly in my browser, although the docx obtained from it through pandoc is fine.
2) The package mhchem does not produce the desired result. The limited support of htlatex by mhchem is declared in the documentation. I had to write a perl script which rewrites the mhchem commands in an easier way.
3) The \mathrm{something} command does not make "something" upright, in my case. The problem is that the "mathrm" is encoded as mathvariant="normal" by htlatex, which should be fine, but then the "normal" is rendered as italic by pandoc. The workaround is to substitute "normal" with something upright, such as "sans-serif". So, between htlatex and pandoc, I run:
cat document.html | sed 's/mathvariant=\"normal\"/mathvariant=\"sans-serif\"/g' >memo.html
mv memo.html document.html
The drawback is that the mathrm text becomes "sans-serif", not necessarily the font we want.
4) Depending on the version and installation of htlatex, I had problems with the figures included with includegraphics. They are converted from the original format to png by calling some programs, which sometimes do not exist. I was not able to fix the bug, but I found a workaround: I add a cfg file that defines the conversions and pass its name to htlatex. So htlatex uses the programs defined by me instead of using its default converters (which do not exist). It takes time but it works.
htlatex
with the following command line:htlatex main.tex "html,word" 'symbol/!' "-cvalidate"
and see if this gets you started. Look for a filemain.html
, Word should be able to load it.