Question

I'm using Doxygen to build an API library from C# source code. Doxygen generates a library of TEX files.

My client has asked for a PDF version of this API library so I need to convert the TEX file library into a single PDF or DOCX.

I've been looking into tools such as LyX, OpenOffice, and ProText but still haven't found a solution.

All suggetions welcome.

Was it helpful?

Solution

The simplest way to get pdf files is to use pdflatex. Any TeX installation will include it, including MikTeX and TeXLive, the two major Windows implementations. The conversion is perfect by definition because pdflatex is a standard LaTeX compiler.

Other methods include dvi2pdf, dvi2ps followed by ps2pdf, etc. But these involve an additional step.

To get a docx file is trickier. There are a range of tex to word converters. I've used Tex2Word with reasonable success, although there is always a deal of tidying up to do. Other tools are discussed here. Whatever you use, you will probably need to convert to doc first, and then to docx, as I don't think any of the conversion tools produce direct docx output.

OTHER TIPS

Why not just compile the .tex documents with LaTeX? On windows use MiKTeX and TeXnicCenter. I'm not sure how much formatting you will need to add, but give the document a standard preamble, and compile. You can output PDF.

EDIT: Further note... the package tex4ht on miktex works pretty well, as long as your latex markup is fairly standard. tex4ht will dump into html, openoffice, and a bunch of other stuff. If you can get it into html, you can take it into word (i've found that this works better than going straight to openoffice).

After some time of research, I stepped across that nice free converter tool that amongst others creates you a .docx file out of a .tex file. Check it out:

Pandoc - a universal document converter.

See their Example Page for demos.

To convert .tex to .docx, use:

pandoc -s example.tex -o example.docx

which will give you a quite satisfying output depending on your expectations. It also converts equations to regular word equations, although not every symbol properly.

texi2pdf will perform this function.

Try using DVIPS with the -Ppdf option. Many Tex distributions include it.

Doxygen generates rtf output as well, which word2007 is happy to convert to either pdf or docx.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top