Hyperlatex implements a certain subset of LaTeX, and adds a number of
other commands that allow you to write better HTML. If you already
have a document written in LaTeX, the effort to convert it to
Hyperlatex should be quite limited. You will have to add the
\htmltitle
command in the preamble, and the \topnode
command in
the beginning of the document. Both commands must start at the
beginning of the line.
In short, the beginning of your document ought to look something like this:(2)
Note the use of the hyperlatex package. It contains the definitions of the Hyperlatex commands that are not part of LaTeX.\documentclass{article} \usepackage{hyperlatex} \htmltitle{Title of HTML nodes} \htmladdress{Your Email address, for instance} more LaTeX declarations, if you want \title{Title for LaTeX document} \author{Author for LaTeX document} \begin{document} \maketitle \section{Introduction} \topnode{Welcome to this HTML Document} This is the beginning of the section titled ``Introduction'' in the printed manual, and at the same time the beginning of the top node of the HTML document...
Hyperlatex ignores everything before the line starting with
\topnode
for the HTML output. The \topnode
command
does not produce any output in the printed copy.
If your document contains footnotes, then you will also need to add
\htmlfootnotes
before the final
\end{document}
.
Those two (or three) commands are all that is absolutely needed by Hyperlatex, and adding them should suffice for a simple LaTeX document. You might try it on the sample2e.tex file that comes with LaTeX2e, to get a feeling for the HTML formatting of the different LaTeX concepts.
Sooner or later Hyperlatex will fail on a LaTeX-document. As explained in the introduction, Hyperlatex is not meant as a general LaTeX-to-HTML converter. It has been designed to understand a certain subset of LaTeX, and will treat all other LaTeX commands with an error message. This does not mean that you should not use any of these instructions for getting exactly the printed document that you want. By all means, do. But you will have to hide those commands from Hyperlatex using the escape mechanisms.
And you should learn about the commands that allow you to generate
much more natural HTML than any plain LaTeX-to-HTML converter
could. For instance, \ref
and pageref
are not understood by the
Hyperlatex converter, because they have no meaning in the HTML output
(as figures, sections, and pages are not numbered--there's no need
for that in HTML). Their function is taken over by the
\link
command.
The following sections explain in detail what you can and cannot do in Hyperlatex.
Many aspects of the generated output can be customized.