TransWikia.com

Converting LaTeX to Word format? Better yet, with equation-editor format equations?

TeX - LaTeX Asked by Carl Smith on September 26, 2021

I have a large .tex draft full of equations, both block and inline, and figures and text. A journal wants us to send a draft in Word format with editable equations. Maybe a long-shot but, is there some quick way to do this?

3 Answers

Here is a solution for Ubuntu: HOWTO convert LaTeX to OpenOffice .odt and MS Word .doc

This page is the place to start: http://www.tug.org/utilities/texconv/textopc.html This page is also helpful (if rather techie): http://www.cse.ohio-state.edu/%7Egurari/TeX4ht/mn.html

Basically, I used tex4ht, which is (as far as I can see) clearly the best way to do the conversion.

However, getting the tex4ht installation set up correctly can be a royal pain, so here's how it worked for me.

Step 1. Install tex4ht from the Ubuntu repositories.

Step 2. Install the upgrade from here:
http://www.cse.ohio-state.edu/%7Egurari/TeX4ht/mn-upgrade.html
This is not a simple procedure. You need to follow every single step exactly, and it takes a little while, especially if you are approaching it in a gingerly and careful way, as I was - not really understanding what I was doing! But the instructions are very clear and accurate, and do work. The conversion to OpenOffice won't work without this upgrade.

There are various other steps that may be necessary depending on what is in your LaTeX file. If, like me, you are using biblatex, you will need to install Eitan Gurari's bug fixes from here:
http://www.cse.ohio-state.edu/~gurari/TeX4ht/bugfixes.html
I also needed to (re)install an up-to-date version of csquotes from here:
http://www.ctan.org/tex-archive/macros/latex/contrib/csquotes/
For some reason, it seemed to be the case that I needed to install dvipng from the repositories (though I don't really understand why).

At that point, things should be ready. Run the following from the command line as user (not root).

Step 3. latex filename.tex (it may prompt you to do this more than once)

Step 4. bibtex filename.aux

Step 5. mk4ht oolatex filename.tex (again, possibly you may need to do this more than once)

At this point, there will be various files in the directory that contained your original .tex file, but among them should be an .odt (OpenOffice Writer) file, which hopefully contains some decent approximation to what you had in LaTeX.

Correct answer by Leo Chapiro on September 26, 2021

I am resurrecting this question since I do not believe what I read. Converting LaTeX document to Word is one thing and can be done fairly straightforward for example by striping LaTeX format and then using something like Pandoc to produce the output. However converting LaTeX document with lots of formulas to MSWord is damn hard. MSWord if I remember correctly requires add on called MathType to edit equations. I am guessing there are people on this portal who are familiar with internals of Word due to their contributions to things like OpenOffice but I would be stun to hear that you can batch process LaTeX formulas into MSWord MathType equations.

Answered by Predrag Punosevac on September 26, 2021

Very frustrating to convert even moderately simple equations. I tried using Word's equation editor's various latex options and completely botched it, mangling even simple fractions. What I had to do was to use LaTeXIT on a mac, drag the gif into the word doc as an inline image. Obviously not a solution for anything more than a few equations in a last minute hack job. I didn't have time to try pandoc (wasn't working on my ubuntu setup) but maybe that is the better solution.

Answered by benh on September 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP