Installation and Further Support
Requirements
The translator makes use of several utilities all of which
are freely available on most platforms.
You can choose between two ways to do the installation of the required
tools: either go the convenient way and install binary distributions
(no compilation required, just install out of the box), or get and
compile a source code distribution.
You will stick to the latter in case you have a special kind of
operating system or want to make customisations prior to compilation
such as applying source level patches.
Windows users will probably want to read the section about
installation on Windows.
For the best use of LATEX2HTML you want to get the latest
versions of all the utilities that it uses. (It will still work
with earlier versions, but some special effects may not be possible.
The specific requirements are discussed below.)
- Perl version 5.003, or later (check with
perl -v
);
- LATEX, meaning LATEX2e dated <1995/06/01>, or later;
- dvips or dvipsk, at version 5.58 or later;
- Ghostscript at version 4.02 or later;
- netpbm library of graphics utilities, version 1-MAR-94
(check with pnmcrop -version ).
- pdftocairo, if you want to produce SVG images
(available through the poppler-utils package)
More specific requirements for using LATEX2HTML
depend on the kind of translation you would like to perform, as follows:
- LATEX commands but without equations, figures, tables, etc.
- Perl
Note: LATEX2HTML requires Perl 5 to operate.
- DBM or NDBM, the Unix DataBase Management system,
or GDBM, the GNU database manager.
Note: Some systems lack any DBM support.
Perl 5 comes with its own database system SDBM, but it is sometimes
not part of some Perl distributions.
The installation script install-test will check that for you.
If no database system is found, you will have to install Perl
properly.
- LATEX commands with equations, figures, tables, etc.
As above plus ...
- Segmentation of large documents
If you wish to use this feature, you will have to upgrade your
LATEX to LATEX2e .
Some other hyperlinking features also require LATEX2e .
- Transparent inlined images
If you dislike the white background color of the
generated inlined images then you should get either
the netpbm library (instead of the older pbmplus)
or install the giftrans
filter by Andreas Ley <ley@rz.uni-karlsruhe.de>.
LATEX2HTML now supports the shareware program giftool
(by Home Pages, Inc., version 1.0), too.
It can also create interlaced GIFs.
If Ghostscript or the netpbm library are
not available, it is still possible to use the translator with the
-no_images option.
If you intend to use any of the special features
of the translator
then you have to include the html.sty file
in any LATEX documents that use them.
If only a character-based browser, such as lynx, is available,
or if you want the generated documents to be more portable,
then the translator can be used with the -ascii_mode
option.
Installation on Windows
For Windows 95, 98, and NT you will either need a newer
html Release 99.1 or higher, or if you like to try an
older release get the Windows 97.1 port by Fabrice Popineau from
ftp://ftp.ese-metz.fr/pub/TeX/win32.
Meanwhile, all the operating system dependent issues are integrated
into the main release, thanks to the cool work of Marek Rouchal.
To install the tools required to run the translator, perform the steps
below. Thanks to Jens Berger (jberger@mail.zedat.fu-berlin.de)
for providing this list!
Subsections
LATEX2HTML is available through the Fedora, Debian, and Ubuntu
package managers for Linux, and the macports package manager for MacOS.
Releases of LATEX2HTML may also be obtained at
https://www.github.com/latex2html/latex2html/releases ,
Finally there is the LATEX2HTML developers' source repository, at https://www.github.com/latex2html/latex2html/ .
The files to be found here are the most up-to-date with current developments,
but they cannot be guaranteed to be fully reliable. New features may be
still under development and not yet sufficiently tested for release.
A daily updated compressed archive of the developers' work may be
downloaded from https://www.github.com/latex2html/latex2html/archive/master.zip .
Having obtained a compressed tar version, save it into a file
latex2html-2019.tar.gz say,
then extract its contents with
% gzip -d latex2html-2019.tar.gz
% tar xvf latex2html-2019.tar
You should then have the following:
- README file;
- Changes index with latest changes;
- Changes.detailed (no longer supplied);
- latex2html Perl script;
- texexpand Perl script4;
- latex2html.config configuration file;
- install-test Perl script, for installation and testing;
- dot.latex2html-init sample initialisation file;
- texinputs/ subdirectory, containing various LATEX style-files;
- versions/ subdirectory, containing code for specific
HTML versions;
- makemap Perl script;
- example/ subdirectory, containing the segmentation example,
described in detail in
a later section;
- .dvipsrc file;
- pstogif Perl script (no longer supplied);
- pstoimg Perl script for image conversion (replaces pstogif);
- configure-pstoimg Perl script for installation;
- local.pm Perl input file;
- icons.gif/ subdirectory, containing icons in GIF format;
- icons.png/ subdirectory, containing icons in PNG format;
- makeseg Perl script and examples to handle segmented
documents via a generated Makefile, see
makeseg.tex
;
- docs/foilhtml/ contains LATEX package and Perl implementation by Boris Veytsman,
to support FoilTeX to HTML translation;
- IndicTeX-HTML/ package that contains Perl and
LATEX code for translating IndicTEX documents (see README file);
- docs/ subdirectory, containing the files needed to create
a version of this manual;
- styles/ subdirectory, containing Perl code for handling
some style-files;
- tests/ contains some test documents for LATEX2HTML.
Subsections
Installing LATEX2HTML
To install LATEX2HTML you MUST do the following:
- Specify where Perl is on your system.
In each of the files latex2html, texexpand, pstoimg,
install-test and makemap,
modify the first line saying where Perl is on your system.
Some system administrators do not allow Perl programs to run as shell scripts.
This means that you may not be able to run any of the above programs.
In this case change the first line in each of these programs from
#!/usr/local/bin/perl
to:
# *-*-perl-*-*
eval 'exec perl -S $0 "$@"'
if $running_under_some_shell;
- Copy the files to the destination directory.
Copy the contents of the texinputs/ directory to a place where they
will be found by LATEX, or set up your TEXINPUTS variable to point
to that directory.
- Run install-test .
This Perl script will make some changes in the latex2html file
and then check whether the path-names to any external utilities
required by latex2html are correct.
It will not actually install the external utilities.
install-test asks you whether to configure for GIF or
PNG image generation.
Finally it creates the file local.pm which houses pathnames for the
external utilities determined earlier.
You might need to make install-test executable before using it.
Use chmod +x install-test
to do this.
You may also need to make the files pstogif,
texexpand, configure-pstoimg and latex2html executable
if install-test fails to do it for you.
- If you like so, copy or move the latex2html executable script to
some location outside the $LATEX2HTMLDIR directory.
- You might want to edit latex2html.config to reflect your needs.
Read the instructions about $ICONSERVER carefully to make sure your
HTML documents will be displayed right via the Web server.
While you're at it you may want to change some of the default
options in this file.
If you do a system installation for many users, only cope with general
aspects; let the user override these with $HOME/.latex2html-init
.
Note that you must run install-test now;
formerly you could manage without.
If you want to reconfigure LATEX2HTML for GIF/PNG image
generation, or because some of the external tools changed the location,
simply rerun configure-pstoimg.
This is usually enough for the main installation, but you may also
want to do some of the following, to ensure that advanced features
of LATEX2HTML work correctly on your system:
- To use the new LATEX commands
which are defined in html.sty:
Make sure that LATEX knows where the html.sty file is,
either by putting it in the same place as the other style-files on your system,
or by changing your TEXINPUTS shell environment variable,
or by copying html.sty into the same directory as your LATEX source file.
The environment variable TEXINPUTS is not to be confused with
the LATEX2HTML installation variable $TEXINPUTS described next.
- There is an installation variable in latex2html.config
called $TEXINPUTS,
which tells LATEX2HTML where to look for LATEX style-files to process.
It can also affect the input-path of LATEX when called by LATEX2HTML,
unless the command latex is really a script
which overwrites the $TEXINPUTS variable
prior to calling the real latex.
This variable is overridden by the environment variable of the same name
if it is set.
- The installation variable $PK_GENERATION specifies which
fonts are used in the generation of mathematical equations. A value
of “0” causes the same fonts to be used as those for the default
printer. Because they were designed for a printer of much greater
resolution than the screen, equations will generally appear to be
of a lower quality than is otherwise possible. To cause LATEX2HTML to
dynamically generate fonts that are designed specifically for the
screen, you should specify a value of “1” for this variable.
If you do, then check to see whether your version of dvips
supports the command-line option -mode . If it does,
then also set the installation variable $DVIPS_MODE to
a low resolution entry from modes.mf, such as toshiba.
It may also be necessary to edit the MakeTeXPK script,
to recognise this mode at the appropriate resolution.
If you have PostScript fonts available for use with LATEX and dvips
then you can probably ignore the above complications and simply
set $PK_GENERATION to “0”
and $DVIPS_MODE to "" (the empty string).
You must also make sure that gs has the locations of the
fonts recorded in its gs_fonts.ps file. This should already be the case
where GS-Preview is installed as the viewer for .dvi-files,
using the PostScript fonts.
If dvips does not support the -mode switch,
then leave $DVIPS_MODE undefined, and verify that the
.dvipsrc file points to the correct screen device and its
resolution.
- The installation variable $AUTO_PREFIX
allows the filename-prefix to be automatically set
to the base filename-prefix of the document being translated.
This can be especially useful for multiple-segment documents.
- The makemap script also has a configuration variable $SERVER,
which must be set to either CERN or NCSA,
depending on the type of Web-server you are using.
- To set up different initialization files:
For a “per user” initialization file,
copy the file dot.latex2html-init in the home directory
of any user that wants it, modify it according to her preferences and
rename it as .latex2html-init. At runtime, both the
latex2html.config file and $HOME/.latex2html-init file will be
loaded, but the latter will take precedence.
You can also set up a “per directory” initialization file by
copying a version of .latex2html-init in each directory you
would like it to be effective. An initialization file
/X/Y/Z/.latex2html-init will take precedence over all other
initialization files if /X/Y/Z is the “current directory” when
LATEX2HTML is invoked.
Warning: This initialization file is incompatible with
any version of LATEX2HTML prior to V96.1 .
Users must either update this file in their home directory,
or delete it altogether.
- To make your own local copies of the LATEX2HTML icons:
Please copy the icons/ subdirectory to a
place under your WWW tree
where they can be served by your server.
Then modify the value of the $ICONSERVER variable in
latex2html.config accordingly.
Alternatively, a local copy of the icons can be included within
the subdirectory containing your completed HTML documents.
This is most easily done using the -local_icons command-line switch,
or by setting $LOCAL_ICONS to “1” in latex2html.config
or within an initialization file, as described above.
- To make your own local copy of the LATEX2HTML
documentation:
This will also be a good test of your installation.
Firstly, to obtain the .dvi version for printing,
from within the docs/ directory it is sufficient to type:
make manual.dvi
This initiates the following sequence of commands:
latex manual.tex
makeindex -s l2hidx.ist manual.idx
makeindex -s l2hglo.ist -o manual.gls manual.glo
latex manual.tex
latex manual.tex
...in which the two configuration files l2hidx.ist and l2hglo.ist
for the makeindex program, are used to create the index and glossary respectively.
The 2nd run of latex is needed to assimilate references, etc.
and include the index and glossary.
(In case makeindex is not available, a copy of its outputs manual.ind
and manual.gls are included in the docs/ subdirectory,
along with manual.aux .)
The 3rd run of latex is needed to adjust page-numbering for the Index
and Glossary within the Table-of-Contents.
Next, the HTML version is obtained by typing:
make manual.html
This initiates a series of calls to LATEX2HTML on the separate
segments of the manual;
the full manual is thus created as a “segmented document”
(see a later section).
The whole process may take quite some time,
as each segment needs to be processed at least twice,
to collect the cross-references from other segments.
The files necessary for correct typesetting of the manual to be
found within the docs/ subdirectory.
They are as follows:
- style-files:
l2hman.sty, html.sty, htmllist.sty, justify.sty,
changebar.sty and url.sty
- inputs:
changes.tex, credits.tex, features.tex, hypextra.tex,
licence.tex, manhtml.tex, manual.tex, overview.tex,
problems.tex, support.tex and userman.tex
- sub-directory:
psfiles/ containing PostScript graphics
used in the printed version of this manual
- images of small curved arrows: up.gif, dn.gif
- filename data:
l2hfiles.dat
- auxiliaries:
manual.aux, manual.ind, manual.gls
The last three can be derived from the others, but are included for convenience.
To get a printed version of the `Changes' section:
Due to the burgeoning size of the Changes file with successive
revisions of LATEX2HTML, the `Changes' section is no longer
supported for the manual.
Please refer to text file Changes instead which is part of the
distribution.
- To join the community of LATEX2HTML users:
More information on a mailing list, discussion archives, bug reporting
forms and more is available at
https://www.latex2html.org/
- LATEX2HTML is actively supported by the international
TEX Users Group (http://www.tug.org). All users are encouraged to join http://www.tug.org,
to keep up-to-date with the latest development in TEX, LATEX,
LATEX2HTML and related programs.
Consult the TUG Web pages at http://www.tug.org/.
Getting Support and More Information
A LATEX2HTML mailing list
is managed by the international TEX User Group (http://www.tug.org).
This mailing used was originally established at the Argonne National Labs,
where it was based for several years.
(Thanks to Ian Foster and Bob Olson, and others.)
Since February 1999, it has been run by http://www.tug.org, thanks to
Art Ogawa and Ross Moore.
To join send a message to: <latex2html-request@tug.org >
with the contents: subscribe
To be removed from the list send a message to:
<latex2html-request@tug.org >
with the contents: unsubscribe
The mailing list also has a
searchable online archive.
It is recommended to start with this,
to become familiar with the topics actually discussed,
and to search for articles related to your own interests.
Enjoy!