ltxdoclet - Java documentation including the source, formatted with LaTeX

ltxdoclet is a doclet for use with the Javadoc documentation system. It produces not HTML pages like the standard doclet, but a LaTeX document, suitable for creation of a PDF documentation.

Optionally, it can also include formatted source code in the output.


Usage from command line

To call the Doclet, use

javadoc -docletpath ltxdoclet.jar -doclet de.dclj.paul.ltxdoclet.DocletStart ...

on the command line (adapt the jar path to the actual location). With -help you will get a command line options overview. The options for my doclet are also available in the source files in github: help_en.txt or help.txt (german).

I think the link options are not fully implemented, but at least -linkhtml (or -link) works.

Usage with ant

If you are using ant, you can to use the usual javadoc task, but have to include the <doclet> subelement like here:


Most options you can provide as javadoc attributes or subelements as usual, as they have the same syntax as the standard doclet's corresponding options (or javadoc's options), only -includesource and the non-standard link options have to be given by param elements in the doclet element.

For a complete example, have a look at our own build file: build.xml


The Java sourcecode itself (see below) is documented by german comments. You can have a look at the output of running the doclet on itself (with -includesource) at ltxdoclet-javadoc.pdf.

Additionally we use a LaTeX-package 'ltxdoclet' (The source ltxdoclet.dtx + ltxdoclet.ins is included with the Java source). The package documentation is at ltxdoclet-ltxpkg.pdf


You can find a compiled binary at ltxdoclet.jar (This is a semi-manual upload, thus it might not always be up-to-date).

The latest source is available as tar.gz or zip (automatically generated by github), or browsable.