Go to the first, previous, next, last question, table of contents.

(La)TeX conversion to HTML

TeX is a typesetting language, not a markup system. With properly-used LaTeX, you may be luckier, but don't expect a free lunch. Remember that a) if you want a really good Web document, you had better redesign it from scratch, and b) HTML (even HTML3) has pretty poor `typesetting' facilities, and anything beyond the trivial will probably need to end up a graphic.

LaTeX2HTML (support/latex2html) is a package by Nikos Drakos (mostly of perl scripts) that breaks up a LaTeX document into one or more components, and links them together so that they can be read over the World-Wide Web as an hypertext document. It defines a mapping between LaTeX intra-document references and hyperlinks, and extends the mechanisms to permit reference to other (possibly remote) documents and other Internet resources. It translates LaTeX accented and other characters (as best it can) to things that World-Wide Web browsers can display, and translates mathematics (and other things that browsers can't deal with) to images that can be loaded in-line into the hypertext document.

LaTeX2HTML needs Perl, the PBM utilities, dvips, GhostScript, and other sundries; it assumes it is running on a Unix system. Michel Goossens and Janne Saarela published a detailed discussion of LaTeX2HTML, and how to tailor it, in TUGboat 16(2).

There are two alternative strategies:

  1. Free-standing LaTeX to HTML translations. Hard, but not impossible. Julian Smart's latex2rtf (available from support/latex2rtf) does a plausible job on a subset of LaTeX;
  2. Writing an HTML-output backend in LaTeX itself. See Sebastian Rahtz' paper in TUGboat 16(3) for a discussion of how to go about this for the general case of SGML.

Go to the first, previous, next, last question, table of contents.