I do all my documents in Latex. Actually i usually use emacs org-mode first and later convert it to Latex, but when it comes to using bibtex, it's all latex. It works great and the output dvi/pdf files look so professional. However recently i had to submit the file in .doc format, and i had a real hard time finding good tools to do that.
There are no direct Latex to .doc converters, so the best bet is to go Latex -> HTML -> DOC. There are lots of Latex to HTML converters like latex2html, tth and hevea, but most of them either don't produce good HTML or mess with bibliography references. But after some research i found the best: TeX4ht
TeX4ht is available in ubuntu/debian repo, so to install
sudo apt-get install tex4htConversion is simple:
htlatex document(please note, there is no .tex suffix)This will generate document.html, css and bunch of .png files.
Now to convert it to wordprocessor files (odt, doc..),
1. Open the html file with OpenOffice.org
2. File > Save as
3. Choose the format you want to save it in (odt, doc)If you have images in the document, they will be linked instead of embedded in the document. To fix this: (source)
1. Edit > Links
2. Click "Break Link" for each image link
Showing posts with label latex. Show all posts
Showing posts with label latex. Show all posts
Wednesday, February 17, 2010
Converting Latex document to HTML / ODT / DOC
Related post on tutverse: How to convert LaTeX file to Office format
Tuesday, February 16, 2010
How to Convert a LaTeX file to an Office Format
The following steps are for a GNU/Linux operating system. This will help convert a .tex file to popular office formats like .doc , .odt and HTML format.
Run the following commands:
If you are using LyX, there are various conversion options in File -> Export menu. One of them is OpenDocument which will export the file into .odt format.
Note: For the above procedures to work, the package tex4ht should be installed in your system. Some formatting might be lost while converting.
Run the following commands:
- $ bibtex example.bib
- $ latex example.bib
- $ tex4ht example.tex
- $ mk4ht oolatex example.tex
If you are using LyX, there are various conversion options in File -> Export menu. One of them is OpenDocument which will export the file into .odt format.
Note: For the above procedures to work, the package tex4ht should be installed in your system. Some formatting might be lost while converting.
Subscribe to:
Posts (Atom)