[l2h] missing install-test file?

Erik Neumann erikn at myphysicslab.com
Tue Apr 10 22:08:05 CEST 2007


For what it's worth, I wrote a little report about my experiences with
LaTeX2HTML on Mac OSX.  Bottom line:  latex2html seems to be currently
unsupported software;  while it may work for some people somewhere, it
doesn't work for me.


Installing and using LaTeX2HTML on Mac OSX

Summary and conclusions:
After some struggles, I managed to get latex2html working (to a
limited extent) on Mac OSX.  However, the result (while tantalizing)
is not sufficiently robust to be useful for me.  In addition, it seems
that the entire latex2html software project is no longer being
actively maintained.  I base this on the following observations:
* the main website http://www.latex2html.org/  seems to have been last
updated in 2001.
* the install instructions at
http://www-texdev.ics.mq.edu.au/l2h/docs/manual/ are incorrect (see
below).
* the email list latex2html at tug.org has not had much traffic in recent years.

Therefore, I conclude that latex2html is not useable for me.  I freely
acknowledge that the various problems I have had could be the result
of my own insufficiencies, such as:
* I am not expert in installing open source unix packages
* Mac OSX is somewhat different to vanilla Linux

But given the low level of support for latex2html, I am not going to
try to struggle further in getting latex2html working for me.

For what it's worth, here are the steps I took:

1. Install unix package Netpbm
L2H makes use of several graphic utilities from the Netpbm package.
These are not pre-installed in Mac OSX.  You can check by trying to
invoke one of the utilities:
$ pnmcrop --version

1.1 Install Fink
To install Netbpm, I used the Fink installer.
"Fink is a distribution of Unix Open Source software for Mac OS X and
Darwin. It brings a wide range of free command-line and graphical
software developed for Linux and similar operating systems to your
Mac."
http://finkproject.org/
Note that fink installs all its software (and the additional packages
you request) in a separate directory called /sw.  This is to keep
complete independence of the fink sw from the mac osx software (found
in places like /usr/bin).  Therefore, you can at any time simply
delete the /sw directory and be back to a vanilla Mac OSX.  Therefore,
you can update Mac OSX without any complications from added-on open
source (fink installed) software.
Note that fink adds /sw/bin location to the $PATH environment variable:
[524:erikn ~]$ echo $PATH
/sw/bin:/sw/sbin:/Users/erikn/Documents/scripts:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/teTeX/bin/i386-apple-darwin-current:/Developer/Tools:/Developer/Tools
Fink added the following line to my .bash_profile
test -r /sw/bin/init.sh && . /sw/bin/init.sh

1.2 Install Netpbm
Fink has a GUI called Fink Commander (an application, drag it to your
Applications folder).
Running Fink Commander will display a list of hundreds of available
open source packages.  Scroll down to the netpbm package.  There may
be several entries for netpbm;  you should install every package whose
name starts with "netpbm" and whose version is the most current.  For
example, I installed binaries for 3 packages which all are at version
10.24-3, the packages were named netpbm-bin, netpbm10, and
netpbm10-shlibs.  I did NOT install the two packages at version
9.25-14 named netpbm and netpbm-shlibs.

After installing netpbm, make sure it is installed by typing at a command line:
$ pnmcrop --version

2. Install LaTeX2HTML
One option for installing L2H is to use Fink.  If you try this, you
will see that Fink wants to install about a dozen large packages,
including a complete TeX installation.  To avoid this, I took the
approach of trying to build and install L2H by hand.  Here are the
steps I took:

2.1 Download latex2html
I downloaded what I'm guessing is the latest version of latex2html from
http://www.ctan.org/tex-archive/support/latex2html/
(I picked the version called latex2html-2002-2-1)

2.2 Edit latex2html files to specify where perl is.
I'm not certain this step is necessary any longer... the instructions at
http://www-texdev.ics.mq.edu.au/l2h/docs/manual/support_tf.html
state that you need to edit each of several perl files in the
download;  I did so to every perl file I could find in the
distribution so that the first line reads
#!/usr/bin/perl -w


2.3 Install latex2html
The installation instructions at
http://www-texdev.ics.mq.edu.au/l2h/docs/manual/support_tf.html
state that I should run something called "install-test"  BUT THERE IS
NO SUCH FILE!
Instead, you should examine the INSTALL file that comes with the download.
As a result, I ran the following commands (you will need to answer
about a dozen questions during the configure script...  I accepted the
default for everything).

[508:erikn ~/OpenSource/latex2html-2002-2-1]$ ./configure
If everything went well,  you may run 'make'
[511:erikn ~/OpenSource/latex2html-2002-2-1]$ make
[514:erikn ~/OpenSource/latex2html-2002-2-1]$ make check
[518:erikn ~/OpenSource/latex2html-2002-2-1]$ sudo make install

Then you can check that latex2html got installed with the commands
"which latex2html" or "latex2html --version".
[523:erikn /usr/local]$ which latex2html
/usr/local/bin/latex2html
[525:erikn /usr/local]$ latex2html --version
This is LaTeX2HTML Version 2002-2-1 (1.70)
by Nikos Drakos, Computer Based Learning Unit, University of Leeds.

Note that this method installs latex2html over your existing Mac OSX
installation (unlike Fink, which does installations into the /sw
directory), so you are at a slight risk of the latex2html software
affecting Mac OSX, or being affected by future Mac OSX upgrades.

2.4 Set variable $TEXINPUTS ?
It seems that this step is NOT needed any longer.  If you want to do
this, you can edit your .bashrc file and add something like the
following:
TEXINPUTS=.:~/OpenSource/latex2html-2002-2-1/texinputs/:$TEXINPUTS
export TEXINPUTS
But my installation is working fine with this commented out.

3.  Use latex2html
To run latex2html is pretty simple:
[536:erikn ~/Documents/Projects/MathWiki/source/Physics]$ latex2html
physicsprob.tex
However I needed to modify my latex documents as follows:

3.1  Including graphics
My test document includes some graphics, and I found I had to modify
it as follows, because latex2html cannot handle .pdf files, only .ps
and .eps.
First, make sure there is an .eps version of the graphic available.  I
happened to already have a .pdf and .eps versions in the source
directory (there are utilities to convert between ps, pdf, eps, etc.).
In the latex file make sure the includegraphics command does NOT
specify .eps or .pdf, it should be like this:
\includegraphics{graph1}
and NOT like this:
\includegraphics{graph1.pdf}
Also, latex2html seems to not be able to find the graphicx package, so
I had to change to this:
\usepackage{graphics}
and NOT this:
\usepackage{graphicx}


4.  Problems with latex2html
latex2html does now run under Mac OSX and produces somewhat reasonable
html versions of my latex documents.  However I am left with the
following problems:

4.1 Many images have thick black underline.
About 25% of the math equations in my latex document wind up in the
html version with a heavy thick black line at the bottom of the image.
 I have no idea why;  I can't see anything different between equations
that do or do not have the underline.

4.2  equation references not resolved.
I am getting a message about the .aux file not being found, in spite
of running latex2html several times.  I suspect that this is solvable
by specifying some option, like where the output directory is, or
where the aux file is.
The physicsprob.aux file was not found, so sections will not be numbered
and cross-references will be shown as icons.

4.3  included graphics not working
Despite having some success with a simple test case, I'm unable to
have the same graphic included in a longer latex document.  Not only
that, but latex2html then gets confused about which equation goes
where after that point.


Regards,
--Erik N


More information about the latex2html mailing list