Next Up Previous Contents
Next: A.2 Other approaches to maths
Up: A Maths and SGML/HTML
Previous: A Maths and SGML/HTML
[ID index]

A.1 LaTEX maths within HTML

The real issue here (for me at least) is rendering equations within an HTML document. There are several tools available which can do that with different trade-offs. The most popular method is to write the equations in a LaTEX document, process it, and then hoik the equations out of the resulting DVI file somehow (typically using dvips and a postscript to gif converter), and display them on the web as gifs. The big disadvantage with this is that you get an awful lot of gifs, and the conversion is rather inefficient.

All this hassle should become irrelevant once we get browsers which can render MathML directly.

There are reviews of the problems, and some of the tools, in articles Maths Typesetting for the Internet, and Comparative Review of World-Wide-Web Mathematics Renderers.

LaTeX2HTML is the granddaddy of these translators - it parses the LaTEX using Perl, and spits out HTML, turning maths into gifs. It's very robust by now.

John Walker's textogif is a Perl program which orchestrates the various tools to do the conversion via postscript, once you've generated the DVI file. It works, but it's terribly slow, which was the motivation for this program.

TeX4ht (TEX for Hypertext) uses TEX's own parser, but still produces equations as gifs. TeX4ht can also emit MathML from LaTeX. The TeX4ht documentation has a useful collection of resources. There's an alternative location for TeX4ht at TUG.

tth: TeX to HTML translator (manual). tth translates LaTEX maths directly to HTML, with remarkable success and astonishing speed, and with good failure strategies. It works very sweetly, but (a) requires you to tweak your browser to have it map the symbol font appropriately, and (b) the resulting HTML can't be printed legibly. From the same source is TtHMML, which translates (La)TEX to HTML plus MathML.

nDVI is a DVI viewer plugin for Unix Netscape. This addresses the problem at the client end.


Next Up Previous Contents
Next: A.2 Other approaches to maths
Up: A Maths and SGML/HTML
Previous: A Maths and SGML/HTML
[ID index]
Dvi2bitmap - convert DVI files to bitmap images
Starlink System Note 71
Norman Gray
14 June 1999. Release 0.9-6. Last updated 12 January 2001