Description

This plugin allows you to include mathematics in a topic, with a format
very similar to LaTeX. The external program latex2html is used to
generate gif (or png) images from the math markup, and the image is then included in
the page. The first time a particular expression is rendered, you will notice
a lag as latex2html is being run on the server. Once rendered, the image is
saved as an attached file for the page, so subsequent viewings will not require
re-renders. When you remove a math expression from a page, its image is
deleted.

Note that this plugin is called MathModePlugin, not LaTeXPlugin, because
the only piece of LaTeX implemented is rendering of images of mathematics.

Syntax Rules

<latex [attr="value"]* > formula </latex>

generates an image from the contained formula. In addition attribute-value
pairs may
be specified that are passed to the resulting img html tag. The only exeptions
are the following attributes which take effect in the latex rendering pipeline:

color: the foreground color of the formula; defaults to %LATEXFGCOLOR%

bgcolor: the background color; defaults to %LATEXBGCOLOR%

The formula
will be displayed using a math latex environment by default. If the formula
contains a latex linebreak (\\) then a multline environment of amsmath is used instead.
If the formula contains an alignment sequence (& = &) then an eqnarray environment
is used.

Note that the old notation using %$formula$% and %\[formula\]%
is still supported but are deprecated.

If you might want to recompute the images cached for the current page then append ?refresh=on to its url,
e.g. click here to refresh the formulas
in the examples below.

Examples

The following will only display correctly if this plugin is installed and
configured correctly.

major rewrite; fixed security issues by using the sandbox feature and creating tempfiles properly; added new <latex>...</latex> tag to support multiline formulas; better configurability; better error reporting; fixed issues where images have not been cleaned up regularly; speedup don't clean orphaned images during view but during save; speedup by adding lazy compilation and initialization; implemented a postRenderingHandler for T* V4; prevent auto-generated images stored in pub from being auto-attached using T* V4