# LaTeXTaglet

## A javadoc taglet for using LaTeX math in javadoc-generated html documentation

#### Overview

Programming math-related software in java is not that unusual in universities. With java comes the tool javadoc for creating html-based documentation from special comments in the source code.
This is often called literate programming.

TeX, introduced by Donald Knuth, also supports literate programming. So does LaTeX as it is based on TeX.

LaTeX is very popular with mathematicians and other scientists using a lot of math in their publications.
Therefore documentation for math-related programs needs to support a way of displaying formulas; ideally in LaTeX.

This project aims supporting literate programming with offering a method to include LaTeX code (restricted to the math environment) via transformation to the pixel-based format .png.

#### Technical Details

Since version 1.4 the tool javadoc supports add-ins called taglets that enhance its presentation capabilities with additional tags. The task of this project is realised using this taglet concept.

Three additional tags are provided to the programmer:

- @latex.equation constructs a line for the formula on its own, it can be surrounded by text
- @latex.$ puts a formula together with the text in one line
- @latex.block.equation creates the formula on its own at the end of the comment, i.e. like the tag author

These tags can be used in javadoc comments as follows:

/** the sum {@latex.$ \sum_{i=0}^n X_i} is finite */, /** the sum {@latex.equation \sum_{i=0}^n X_i} is finite */ or /** @latex.block.equation \sum_{i=0}^n X_i */
It has to be mentioned, that the first two taglets are so called inline taglets, while the last one is a block taglet (the curly braces can be left).

Please, have a look at the API.

#### Downloads

This is a sourceforge.net project. Its compiled files, sources and documentation can be found on http://sourceforge.net/projects/latextaglet.

#### Comments, bugs, feature requests

Please use the trackers adn forums on http://sourceforge.net/projects/latextaglet.

I have to apologize for my bad English. Any corrections are very welcome. ;-)