nrao nrao
next up previous contents index home.gif
Next: 3 LaTeX2HTML basics Up: LaTeX2HTML Authors' Guide Previous: 1 Purpose


2 LaTeX, HTML, and PostScript/PDF

It is attractive to generate HTML webs automatically from LATEX source files because

  1. any valid LATEX document is structurally robust, and

  2. its basic structure (as opposed to its detailed format) can be mapped uniquely into HTML, as illustrated in Table 1.


Table 1: LaTeX/HTML Equivalencies
LaTeX HTML
\chapter $<$H1$>$
\section $<$H2$>$
\subsection $<$H3$>$
\subsubsection $<$H4$>$
\par $<$P$>$
\begin{description} $<$DL$>$
\begin{enumerate} $<$OL$>$
\begin{itemize} $<$UL$>$
\item $<$LI$>$
\begin{table} $<$TABLE$>$
\begin{figure} $<$IMG$>$
\emph{text} $<$EM$>$text$<$/EM$>$
\textit{text} $<$I$>$text$<$/I$>$
\textbf{text} $<$B$>$text$<$/B$>$
\texttt{text} $<$TT$>$text$<$/TT$>$
\verb|text| $<$PRE$>$text$<$/PRE$>$
\label{text} $<$A NAME="text"$>$
\ref{text} $<$A HREF="#text"$>$

LATEX2HTML provides such a mapping. It uses the sectioning markup in a LATEX source file to break the document into a cluster of HTML pages, or ``nodes''. While doing so, it adds hypertext navigation links based on any internal labeling (cross-references within the document). It can also build hypertext equivalents to the table of contents, indexing, and bibliography options in the master. LATEX2HTML sorts any LATEX items that cannot be mapped into HTML, such as equations or non-Latin symbols, into bitmapped graphics (or, optionally, PostScript) so that they can also be displayed by WWW browsers.

LATEX2HTML also provides an html.sty style that adds ways to specify hypertext links to other documents, and ways to specify conditional text so that one LATEX source file can specify a technical document appropriately for publication either

  1. as a paper document,
  2. as a single PostScript or PDF file, using either LaTeX2e and dvips, or pdflatex, or
  3. as a navigable HTML file cluster or ``web", using LATEX2HTML.

A further benefit of using html.sty with pdflatex is that the output .pdf file produced by pdflatex can provide active links to other documents when viewed in a network-aware reader, whether or not you also create a full-fledged HTML web from the source it using LATEX2HTML.

Early versions of LATEX2HTML left much to be desired. They did not handle large documents reliably and their default output of symbols and equations was ugly. The ``2k" implementation, while still formally a beta distribution, is more capable and robust. LATEX2HTML is now being maintained and documented by an open-source consortium. The documentation is comprehensive (although it lags behind the current version), and there is an extensive archived email forum. The forum discusses current problems and development issues, and offers free (but often well-informed) help from other users of the package.


next up previous contents index home.gif
Next: 3 LaTeX2HTML basics Up: LaTeX2HTML Authors' Guide Previous: 1 Purpose


Home | Contact Us | Directories | Site Map | Help | Search


2001-06-08