Using latex2html
Latex2html is a handy tool for generating html files from latex
documents. In addition to formatting the text in a manner similar to
the way it appears in the original document, it creates gif images for
figures and equations, and it adds html links for jumping to figures
and bibliographic references. You can also perform some special
tricks with the html.sty style; for example, you can pass href's
through to the html file, while the latex version of the document will
print the URL as a footnote. For details on using latex2html, consult
the
documentation .
Changes to latex2html
I have installed the latest version (96.1) in the /usr/common tree.
I've also made some modifications to the source as described below.
Postscript to gif conversion
The default ps to gif converter uses ghostscript to rasterize, but the
results are crummy. The program "fromps" (ps to Iris image converter)
made available by Paul Haeberli does a much nicer job by using
Impressario's PSRIP. I've modified the pstogif that comes with
latextohtml to use the better tools. I'm not sure if all of the
machines have the Impressario's PSRIP installed - lambert and wavelet
definitely do. You can find out for sure by trying "fromps" on the
machine in question; it won't work if the PSRIP isn't installed.
Borders for non-transparent figures
If you choose not to use transparent figures, they will be generated
with a white background. Previously, the image would be cropped right
up to the first non-white pixels. I've changed this so that it now
leaves a white border around the image. To get non-transparent
figures, you will need the line:
$TRANSPARENT_FIGURES = 0;
in your .latex2html-init file. Amazingly, this cannot be the last
line in the file, else perl barfs. So stick it somewhere other than
the last line.
Gamma correction
You can introduce gamma correction into your images by adding a line
such as the following to your .latex2html-init:
$FIGURE_GAMMA = 0.8;
A value less than 1 will darken the images. This can be convenient if
you have prepared a paper for printing on the dyesub printer; the
images in the paper would be too light for publishing on the web.
Caveats when using latex2html
Return to list of HowTo documents
Brian Curless
[email protected]