Next: 3.5 Alternatives to LaTeX2HTML
Up: 3 LaTeX to HTML conversion
Previous: 3.3 LaTeX2HTML under Windows
3.4 Using LaTeX2HTML
With all of these packages installed, you can write a single source file, e.g., mydoc.tex,
using the html.sty style to specify your document, then run whichever combination you
need of:
- latex mydoc to make a .dvi file, followed by dvips mydoc to make Postscript output, or
- pdflatex mydoc to make PDF output, or
- latex2html mydoc to make a self-contained HTML web with built-in navigation aids.
The only minor hiccups known to me in this process are as follows:
- Graphics to be included in the final document must be in the same directory as the source
file when running latex mydoc but in the target (e.g., mydoc) subdirectory when running latex2html mydoc with its subdirectory option enabled. This idiosyncracy of LATEX2HTML under Windows
is often mentioned in the
email discussion forum, so I presume that an elegant fix for it has eluded even the
wizards so far. Two work-arounds are (a) to copy any such graphics files into both the
input and output directories, or (b) to turn off the program's (default) option to write the
output into a new subdirectory! (This problem reportedly does not occur under Linux/Unix.)
- You cannot use all graphics input file formats to produce all output formats. TEX
and LATEX accept Postscript and Encapsulated Postscript graphics, but working with
other graphics formats (such as .jpg) requires you to insert the Bounding Box information
with every graphic. This is awkward at best, so it is better to convert other graphics
formats to Postscript before including them in documents to be output as Postscript.
Unfortunately, pdftex and pdflatex, which accept .jpg, .pdf, .png or
.tif graphics, cannot process Postscript graphics.
- URLs that employ characters with special meanings in TEX, such as tilde and
underscore, cannot be made fully functional in all output formats. Tilde can be
specified in link text as
\~{} and underscore as \_ , and will thereafter
appear correctly in printed documents and in the HTML that is output by LATEX2HTML.
Unfortunately, however, pdflatex remembers the original TEX input syntax
and issues it literally as the URL if you click on the link while reading
the .pdf document in Acrobat.
I am compiling an Authors' Guide
for LATEX2HTML
to document methods and tricks that I have found useful when using this package.
I have also tested an NRAO-specific modification to the LATEX2HTML Perl scripts that
provides an option to emit NRAO-standard .shtml web pages (using the observatory's
official server-side includes). This option lets you convert LATEX documents directly
to the approved NRAO web page format, and can be turned on and off via the
LATEX2HTML initialization file, as described in the Authors'
Guide.
Next: 3.5 Alternatives to LaTeX2HTML
Up: 3 LaTeX to HTML conversion
Previous: 3.3 LaTeX2HTML under Windows
Home |
Contact Us |
Directories |
Site Map |
Help |
Search
|