[l2h] Tips&Tricks for installing and running Latex2Html under Windows 98 SE

Rob van Linden rob.vanlinden at freeler.nl
Sat Jan 31 13:47:58 CET 2004

For all those who are experiencing trouble when trying to use Latex2Html on
a Windows 98 SE machine the following tips might help. It's how I solved all
problems on my machine (it took me two full days to get everything fixed).
These tips may also be helpful on other Windows versions.

1)Install PERL and Latex2HTML in the default suggested directories if
Install GNUWIN32 (NetPBM) in c:\gnuwin32 (not in "Program Files"). Perl has
problems with directory names that contain spaces.

2) Use PERL build 631 (it can still be downloaded from the web at some
places). I tried the latest build and it gave the following problem when
running Latex2Html at the moment it is going to convert images:
Invalid COMMAND search path
The DOS-box then hangs and can only be removed via Taskmanager.
It seems to have something to do with the way PERL issues certain DOS
function calls.
Build 631 works fine on my machine. I'm not sure if 635 will work.

3)The error "No such file or directory" during the conversion of images when
running Latex2HTML:
Although the TEMP directory exists it cannot be found by Perl. This can be
solved by making sure that the TEMP and TMP environment variables EXACTLY
match the real directory names of the TEMP directory. PERL is obviously case
sensitive in this respect. I solved this by adding the lines
at the end of my AUTOEXEC.BAT. On my machine the WINDOWS directoryname as
well as the TEMP directoryname are all in capitals.
You must do this BEFORE running CONFIG.BAT and INSTALL.BAT of the Latex2HTML
installation. These batch files copy the environment variables into files
that will be used by PERL later on.

4) DVIPS version not recognized during running CONFIG.BAT.
To get this problem fixed (it seems to be very common) I edited the file
Find this section:
    foreach $veropt (@tryopts) {
      my ($stat,$msg,$err) = &get_out_err("$dvips $veropt");
      $msg .= $err || '';
      if(!$stat && $msg =~
/(?:^| )dvips(?:\(k\)|k|)\s*(\d+[.]?\d*[A-Z]?)/is) {
        $version = '';

And change it into:
#    foreach $veropt (@tryopts) {
      my ($stat,$msg,$err) = &get_out_err("$dvips $veropt");
      $msg .= $err || '';
#      if(!$stat && $msg =~
/(?:^| )dvips(?:\(k\)|k|)\s*(\d+[.]?\d*[A-Z]?)/is) {
        $version = '5.90a';
#        last;
#      }
#    }

Where it says: '5.90a' fill in the appropriate version of your DVIPS. That
can be found by simply running DVIPS from the command prompt without
options. It states its own version number in the first lines.

4) After running the Latex2HTML INSTALL.BAT edit the file l2hconf.pm that is
placed somewhere in the Latex2Html installation directory.
Find the line:

And make sure it contains:
@IMAGE_TYPES = qw(gif png);

This gets rid of the "unsupported image type" error.

5) Errors with Environment space, Out of environment space etc. can be
solved by making sure that the default for all DOS-boxes is set with
Environment space at least 1024 (see the tab "Memory" in the Properties of
the DOS-box).

6) Your working directories and output directories may NOT contain spaces or
other strange characters. So "My Documents" will not work. Preferably use
directory names that are no longer than 8 characters (Perl seems to be able
to work with longer names, but to be on the safe side, just follow this

Best regards,
Rob van Linden

More information about the latex2html mailing list