Subsections


7 Installation

Note: The software described on these pages is no longer supported. Do NOT follow the instructions here. To obtain the fixed up version of LATEX2HTML described here, go to either http://www.eng.fsu.edu/~dommelen/l2h or http://www.dommelen.net/l2h.

This section describes how to install LATEX2HTML on Windows or Unix.


7.1 Windows Installation

Note: The software described on these pages is no longer supported. Do NOT follow the instructions here. To obtain the fixed up version of LATEX2HTML described here, go to either http://www.eng.fsu.edu/~dommelen/l2h or http://www.dommelen.net/l2h.

Continued availability of this installation procedure will depend on whether the various people who wrote the software involved complain about this distribution procedure.

Note: a bug in the installation scripts for Windows XP and higher was fixed Sep 2012. It is not clear to me why nobody noted that bug, including me.

7.1.1 Required for Windows 95, 98, ME

(Please skip this subsubsection if you have Windows NT or XP!)

You will need to edit the file CONFIG.SYS in the top directory of the C:\ disk to assure that you have reasonable resources for DOS programs. Before doing so, use Windows Explorer to put a backup copy of your original CONFIG.SYS file to another location, in case something goes wrong.

Editing CONFIG.SYS can be done with Notepad or a better editor, but it must be done very carefully. If you use Notepad, do “File” / “Open”, and select “All Files” behind “Files of Type:”, or you will never see the CONFIG.SYS file. If CONFIG.SYS does not yet exist, just use “File”/“New” in Notepad and save the new file as CONFIG.SYS in the C:\ top directory. Your CONFIG.SYS file should contain lines like:

SHELL=C:\WINDOWS\COMMAND.COM C:\WINDOWS\ /E:2048 /P
FILES=60
BUFFERS=30,0
STACKS=9,256
DOS=HIGH,UMB
If you already have such lines (same first word), make sure that the numbers are at least as big as shown above. If you do not have such lines, insert the lines as above, at the end of the CONFIG.SYS file. Carefully check that everything is fine, watching out for typos, points instead of commas, semi-colons instead of colons, slashes instead of backslashes, etcetera, (cut and paste from above is recommended), then save. If the file is new, be sure you save as CONFIG.SYS in the C:\ folder. If you use Notepad, select “All Files” behind “Save as Type”, or it may save it as CONFIG.SYS.TXT instead of as CONFIG.SYS. You may want to check it did not pull this trick on you anyway. (If so, try enclosing the name in double quotes when saving.) Do not mess around with other lines in the CONFIG.SYS file. Later, when you are confident that all works well, you might be able to reduce the various values a bit by trial and error.

You will need to reboot now so that the new CONFIG.SYS can be made active. Return to this point after the reboot. If the reboot produced problems, restore your original CONFIG.SYS file and consult someone familiar with CONFIG.SYS.

7.1.2 Required for everybody

Whether you want the easy install, or need to configure manually, everybody needs to follow the steps below:

  1. Log in with administrative privileges if you are on Windows NT or XP.

  2. Install ActiveState Perl. Be sure to install to the default directory C:\Perl. File perl.exe must be in directory C:\Perl\bin. Perl does not have to be added to your path: LATEX2HTML-FU will add it at run time if needed.

    Yes, some versions of TeX come with some limited perl, but they do not seem to work with LATEX2HTML; not enough packages. The 50 Mb for Active State perl is nowadays not a point, so just install it, OK? You do not need to add Perl to your path during install unless you plan to use it yourself. I do not.

    If you want to ignore this word of advice, Perl anywhere except at C:\Perl\bin will require manual configuration. Perl versions below version 5.002 will absolutely not work. Use perl -v to check.)

  3. Install Ghostscript. I have version 8.14, at work we have 8.0. Both work fine. The manual lists 5.1 or later to avoid problems. I recommend 8.14 since I know that that one works, and you must put it below C:\gs like the installation should give as default.

    If you ignore this word of advice, Ghostscript anywhere except below C:\gs will require manual install, or at least modification of C:\l2hsup\init.bat.

  4. Go to the access page to get file l2hfu3.exe (5 Mb). Put it in the top folder of your C: disk, below My Computer.

    Note: this paragraph should be ignored. By now emTeX is far out of date. Just try MiKTeX instead. People without TEX, or who have problem running their own TEX with LATEX2HTML should also get l2hmtx.exe, emTEX, the best version of TEX ever produced. Lean and fast. However, note that emTEX is no longer being updated. Also, if you need to add packages, you need to use the $5+3$ scheme to save any sty files with long names. For example, to add the verbatimfiles package, VERBAtimfiLES.sty would have to be copied to C:\Emtex\Texinput\Latex2e\Etc as VERBALES.STY. (Verbatimfiles is already installed, however, as is subfiure.sty for the subfigure package.)

    Go to the access page now to get l2hfu3.exe.

  5. Next you need to download a batch file to do the actual installation, depending on your version of TEX. Save this file again in the top folder of your C:\ drive by right-clicking the appropriate link below and selecting “Save Target/Link As.” Select the batch file from the following list:

Now in “My Computer,” open the C:\ drive and double click the l2hin....bat batch file you just loaded. Follow the instructions on the screen.

If the batch file terminates with a request to try to process a document, proceed to the next subsection.

If the batch file terminates in a message that installation failed, see what else it says on the screen. Contact me, section 3, if you cannot figure out why it failed, after writing down what it said last on the screen.

Alternatively, you can double-click l2hfu3.exe to at least install the LATEX2HTML files. That should really be enough to allow you to go to the second subsubsection following, manual configuration.

Some other potential problems that I can think of:

7.1.3 Check installation

You are now ready to process a simple test document and see whether everything is OK. (These instructions are also printed on your screen by the installation script.)

Open the l2hsup folder on the C: disk in My Computer, then

This creates a command window for running latex2html. (You may want to copy the icon to the desktop for easier access in the future.)

You will now use this command window to convert a document to HTML. That document is index.tex in the subfolder check of the folder l2hsup on the C:\ drive. In the command window, enter the following commands to do so:

c:
cd \l2hsup\check
latex index
latex index
l2h
Enter a running title when asked. Watch the screen including top window line.

Be sure the latex commands correctly process the document. That has nothing to do with LATEX2HTML, just whether your version of TEX is functioning correctly. (With the exceptions noted in the notes below.) In the l2h command, Perl may take a minute to start up LATEX2HTML on an older Windows 98 machine. The l2h command will complain about “large”, and about having to make images of nonstandard accented characters, this can be ignored.

To examine the created web pages, in “My Computer” open the folder l2hsup, then the subfolder check, and double click index.html. Check the web pages to ensure that the math formulae and the figure are there.

If there are any problems, first check out the following additional notes for the installation script you used:

If that does not solve it, proceed to the next subsubsection.

However, if everything was OK, proceed to section 8, “Usage”.

7.1.4 Manually configure LATEX2HTML

As you will see, the installation is not for the unsophisticated, though easier than the original stand-alone LATEX2HTML. And all I can do is answer questions you may have on the installation procedures, not on your operating system or version of TeX. However, if you have a commercial version of TeX, or another current system, and want to work together to create an easy install procedure for that TeX/operating system, contact me, section 3, and we will mess around until we find out how to do it. If there is an apparent problem in the installation procedure, I will fix it immediately, e-mail me. The same if you have hints or corrections to the installation instructions that may make it easier for others. Ways to deal with different LATEX implementations is one example.

I will try to be complete, in any case. Read through all instructions before doing anything. Don't make changes in the procedure or you will get in trouble. Watch for typos doing the install.

  1. Go into “My Computer”, and open the C:\ drive, then the l2hsup folder in it. (If you do not have the l2hsup folder, it is back to the second last subsubsection.)

  2. (You may want to examine a file called initbin.txt in this folder. It is supposed to hold a pointer to your TEX installation location. If it does not, you may want to delete the file; most TEX installations are already set up to work fine without such a pointer.)

  3. Based on your version of Windows, double-click either the Windows_98-ME or Windows_XP icons to create a “command window”. Enter the following in this window:
    DOSKEY /INSERT
    (This will allow you to correct typos with the arrow keys.) Leave the window as is for now.

  4. The crucial thing is to get a file called latexl2h.bat to function properly. The l2hingen script you ran will have selected a best guess for this file. The first thing is to try whether it works out of the box.

    To do so, in Windows Explorer, go into the subfolder test of l2hsup. Double click the file test.bat in that folder. If all is well, it will run LATEX a couple of times. The second time there will be an undefined variable \alliswellthatendswell. This is intentional, just check that the LATEX identifies itself as “LaTeX2e” and hit return. If execution ends in the message “Test seems fine. Hit any key to continue...”, and it ran 2e, with no cheating, you have finished the most tricky part of the installation. Proceed with item 5.

    If not, you will need to create latexl2h.bat from scratch. There should be a batch file setmod.bat in folder l2hsup; double click it to reset latexl2h.bat to generic form.

    Now Right click the file latexl2h.bat in the same folder, and select “Edit.” You will be changing this file to work on your system. Make the Notepad window wide enough.

    Leave Notepad alone too for now and go find the documentation that came with your version of LATEX 2e and find:

    1. The DOS command to run LATEX 2e
    2. The way to set the TEXINPUTS (or TEXINPUT for some versions of TEX) variable.

    Now if your system uses TEXINPUT instead of TEXINPUTS, at the indicated place REQUIRED CHECK, change the “yes” into “no”.

    Then, under REQUIRED MODIFICATION 1 you need to set TEXINPUTS correctly for your system, as detailed in your manual, but add to it the ..; or ;.. next-higher directory.

    Examples of how to do this on various systems can be found in the files latexl2h.mtx for emTEX, latexl2h.fpt for fpTEX, latexl2h.xtx for XEmTeX, and latexl2h.mkt for MiKTeX.

    If you have MiKTeX 2.4, don't bother with TEXINPUTS at all, it will not help. Instead just copy latexl2h.m24 into latexl2h.bat. You also will need to append the miktex.ini file found in the subfolder local of subfolder m24 of subfolder l2hmods of folder l2hsup to your local miktex.ini file as described in the MiKTeX documentation. (The l2hingen script should have already done all this for you, however.)

    Next, under REQUIRED MODIFICATION 2, you need to put the command to run latex on your machine, giving it arguments %1 %2 %3 %4 %5 %6 %7 %8 %9 for technical reasons.

    After making the above modifications and saving the latex2lh.bat file (don't forget to save!), double click the file test.bat in the subfolder test of l2hsup again and see whether it works now. If execution ends in the message “Test seems fine. Hit any key to continue...”, and it ran 2e and noticed the undefined string, proceed with item 5

    If LATEX says it is LaTeX2e and correctly processes the file in Test 1, but Test 2 comes back with a message that the latex command may be a batch file, use Find from the Windows Start menu to find that batch file. For example, if you used the command latex2e to run LATEX, search for the file named “latex2e.bat”. After finding it, open that file in Notepad. The way to actually run LATEX should be inside. Copy that over to latexl2h.bat instead of the batch file name. If you are lucky, it also has the correct way to set TEXINPUT[S]. Just copy that over to latexl2h.bat too and append “;..” or “..;” to it. Save and go repeat the test.

    If you cannot find your documentation, you might try latex or latex2e for the command line. (Of course followed by %1 %2 %3 %4 %5 %6 %7 %8 %9). Or use Find in the Windows Start menu to search for likely candidate files (search for string “latex” or just “tex”, say.) It should have a .exe, .com, or .bat file extension. (If it has a .bat file extension, see above for what to do with that.)

    If you cannot find how to set TEXINPUTS, enter the following in the DOS window you opened up earlier:

    set | find /i "TEXINPU"
    If you then see a line like, maybe,
    TEXINPUTS=c:\tex;c:\letters;c:\y&ytex\latex;c:\y&ytex\latex2e;.
    you are in luck. At the appropriate place under “REM REQUIRED MODIFICATION 1” in latexl2h.bat, add a line
    set TEXINPUTS=c:\tex;c:\letters;c:\y&ytex\latex;c:\y&ytex\latex2e;.;..
    In short, put “set ” in front of the line and append “;..” to it. Save latexl2h.bat and repeat the test.

    If that does not work either, if you have Y&YTeX, try the line above anyway. If you have TEXlive/ fpTEX/teTEX, you should try:

    set TEXINPUTS=;.;..

    If nothing works and you cannot pass the test according to requirements, restore CONFIG.SYS, delete file folders l2h, l2hsup, and l2hins on the C: disk. Take out your MS Word documentation. LATEX2HTML is not for you. Most people are perfectly happy with the web pages produced by Bill Gates anyway.

  5. Now you need to find how to run dvips on your system. In the DOS window:
    c:
    cd \l2hsup\test
    dvips32 -Ppdf -E index
    If dvips(32) does not answer, try plain dvips, which is correct for TEXlive. If that does not work, search for the files as before. If dvips answers but complains about the -E (eps files) option, you want to consider upgrading to version 5.8.3. If dvips does not know the pdf printer, your formulae are not going to be as sharp as they could be. Consider installing just the dvips part of TEXlive. Yes, I know. Otherwise leave out “-Ppdf”. Anyway, write down how to run dvips on a piece of paper.

  6. You need to find out how to run the TEX executable on your system. In the DOS window, try
    tex index
    If TEX answers, and complains about the LATEX, all is OK; just enter x to exit. Otherwise, search for the executable. It might be the same as the one that runs LATEX without the &latex or whatever. On my system, it is tex386, which is typical for emTeX. If you cannot find it, just write down the same executable as used for LATEX for both TEX and iniTEX below and don't use the stupid -ldump option of LATEX2HTML. It is not going to save any time anyway.

  7. You need to figure out how to run iniTEX on your system. In the DOS window, try
    initex index
    On my system, iniTEX is run by adding a /i behind the TEX executable tex386. On some systems, that is -ini instead.

  8. You do need to find the way to run ghostscript on your system. In the DOS window you opened earlier, type:
    gswin32c
    If ghostscript answers, just enter quit. The way to run ghostscript is “gswin32c”. Otherwise, use Find in the Start menu to find the file named “gswin32c.exe”, and add the full path to the file. (If you only have “gswin32.exe”, you must upgrade ghostscript.) For example my gswin32c is in folder “bin” which is in folder “gs8.14” which is in folder “gs” on the C drive, so my way of running ghostscript is as
    C:\gs\gs8.14\bin\gswin32c
    Your version numbers are likely to be different. Write down how to run ghostscript after you get it to work.

  9. You need to find out how to run perl on your system. In the DOS window, try:
    perl -v
    If perl answers, the command to run perl is perl (without the “-v”). On my system, it is
    C:\Perl\bin\perl.exe.

  10. Right-click the file config.bat in the l2hins (not l2hsup) directory and select Edit. Find the line
    set PERL=C:\Perl\bin\perl.exe (or maybe just set PERL=perl) and replace C:\Perl\bin\perl.exe (or perl) with the way to run perl on your system you just found. Save.

  11. Edit the file prefs.pm in the l2hins directory using Notepad or better. You want to make the minimum changes you can; after everything works correctly, you can always go back and play around.

    Do not touch the $prefs{'TEXLIVE'} = 'no'; line even if you have TEXlive.

    Find the TEX line, starting with $prefs{'TEX'} and put the way to run TEX on your system between the single quotes behinf the equals sign. Note that you need to double any backslashes in prefs.pm.

    Change the INITEX line a few lines below correspondingly. (If, like on my system, you need to append /i or -ini, do not do that here. Instead open file l2hconf.pin (not .pm) and add the /i behind @INITEX@ a few lines down in that file. Return to prefs.pm.)

    Change the value of TEXPATH, into the folder where you want the \usepackage packages that come with LATEX2HTML to be put. This can be any of the TEXINPUTS directories except the . or .. ones. In the same place as “article.cls”, the article-style class file, would be a pretty sure bet. Modern installation of TEX tend to use something like ...\\texmf\\tex\\latex\\latex2html, the dots denoting possible higher directories, and the latex2html folder to be added during the installation.

    Change the value of the DVIPS to what you found.

    If you found that the pdf printer did not work, remove -Ppdf from the DVIPSOPT pref. In that case you may eventually want to experiment with the next three options to try to improve the quality of math images.

    If your dvips did not do eps, set EPS to 0 instead of 1.

    Change the GS ghostscript option. Change all three, just to be safe.

    Save prefs.pm. Just doing a simple save should be OK. Otherwise, make sure to select “All files” when saving, or it may save it as prefs.pm.txt. If it still does. enclose prefs.pm between double quotes when saving. It's Microsoft.

  12. If you use EmTeX, which uses EMX/RSX, the warning message produced by RSX when dvips runs interferes with the installation procedure. Use SET RSXOPT=-Re0 to turn it off.

  13. In the DOS window, do
    c:
    cd \l2hins
    del config.log
    config
    If this terminates in an error message, try to solve it by making appropriate changes in file “prefs.pm”. Repeat from del config.log.

    If you get to the stage where it creates all files from “cfgcache.pm” to “l2hconf.pm”, carefully examine the log file “config.log” in the “l2hins” directory using Notepad or better. I have “no”s for kpsewhich, mktexlsr, and texhash, which emTEX does not use. If you get another “no”, investigate before proceeding to the next item.

  14. You are now ready to test for basic operation. In the DOS box, enter:
    test
    If it freezes at some stage, have a look at what is in the C:\Temp directory for a clue, and try hitting the Return key. If it just complains about aux files, but tells you to view results with your browser, do so. The web pages should look rough, but correct. If not, I recommend pulling a lot on your hair. One thing you could do if you have used all your hair, is to examine whatever is in the “Temp” folder on the C: disk. Latexl2h.bat that you modified earlier puts some error info there if errors occur.

  15. If the test web pages are correct, in the DOS box, enter
    install
    This will create the folder “l2h” on the C: disk.

  16. Get rid of the junk. In the DOS box:
    c:
    cd \l2h
    C:\l2hsup\var\deldir texinputs

  17. If you have an older DOS type TEX, you might need to rename the verbatimfiles.sty file, (use Windows Find to find the one in your TEXINPUTS path,) since its name is too long. For emTeX, I have to rename it to verbales.sty.

  18. If your dvips version supported the -E option, execuye the following command to create a non-eps option to deal with the occasional buggy figure, such as some figures using \special.
    C:\l2hsup\var\creaneps
    which is the last thing to do. You probably want to keep installation folder l2hins in case your system changes.

If you have information that may be helpful to others for installing, e-mail me, section 3, including your flavor and version of TEX and I will add it to this document.

If there are errors in the installation procedure, please let me know; I will correct them immediately.

7.1.5 Uninstall

This install does not make significant changes to your system. The scripts do not touch config.sys, autoexec.bat, or the registry. Simply deleting the folders l2h, l2hins, and l2hsup, l2hold, and EMTEX and texfonts if present, pretty much get rid of it.

However, the better method is to double-click the uninstal.bat file in the l2hsup folder on the C: drive. This will undo all changes, including remove the style files the installation may have added to your TeX installation, and the bug fixes performed for some versions of MiKTeX. First make sure that you have closed any DOS window that you may have used to test the installation.

I find that Windows XP may keep open the l2hsup window even after the folder has disappeared. It’s Microsoft. Just check in the C: folder. If the install was OK, but the folders are still there, an earlier version was restored. Just keep uninstalling until the earlier versions run out.

What the uninstall script does beyond deleting the folders above can be found in uninsta2.txt in the var subfolder. Users familiar with DOS can examine this file by right-clicking it and selecting “Edit.” The trouble with uninstall scripts is that they are unaware of any relevant changes you may have made to your system after you installed LATEX2HTML. Is TEX still there? Have you removed or moved the style files yourself? The script tries to be robust in those matters, but there are limits.

Windows 98-ME users will want to restore their original CONFIG.SYS if they changed it.

If you also downloaded emTeX, there is an uninstal.bat file in the EMTEX folder too.

Perl and Ghostscript have their own uninstall procedures.


7.2 Unix Installation Instructions

Note: The software described on these pages is no longer supported. Do NOT follow the instructions here. To obtain the fixed up version of LATEX2HTML described here, go to either http://www.eng.fsu.edu/~dommelen/l2h or http://www.dommelen.net/l2h.

7.2.1 Easy linux install

Continued availability of this installation procedure will depend on whether the various people who wrote the software involved complain about this distribution procedure.

This install was found to work on Centos 4.4 with TeXlive 2007, Debian Etch with teTeX, and Debian Lenny with TeXLive. It should work on other linux versions running on x86 machines, but not on non-Intel hardware. On Lenny 5.0, 5/7/09, I found that I had to install the libg2c0 g77 library, which is apparently no longer automatically included.

Other versions of TeX should be OK as long as they have an TeXLive compatible latex command and process TEXINPUTS the same way. You can also use the easy install as a basis for an incompatible version of TeX and take it from there (i.e. then adjust latexl2h and prefs.pm as described in the full installation section and run configure and the make commands.)

Preparation is to check that you have decent versions of ghostscript, 5.1 or later, and /usr/bin/perl, 5.002 or higher. In a terminal/xterm/console/command window, try

gs -version
perl -v
If you do not yet have either program installed, your linux package manager can do it. You also need the Info-ZIP unzip utility or equivalent.

For LATEX you should have the epsf.sty and hyperref packages installed. If you do not yet have them, TUG has them in downloads/CTAN. From the 2007 TeXlive DVD, you can instead install them using the commands

sh install-pkg.sh --package=hyperref --nodoc --nosrc
sh install-pkg.sh --package=epsf --nodoc --nosrc

Now go to the access page to get file l2hlnx86.zip (4 Mb). Put it in your HOME folder.

Open a terminal/xterm/console/command window and enter:

tcsh
cd ~
unzip l2hlnx86.zip
cd ~/l2h/l2hins
[read the absence-of-warranty, license, readme, FAQ, and manifests there]
cd ~/l2h/l2hsup/copright
[read all files there]

To install the fixes, continue with:

source ~/l2h/l2hsup/init
~/l2h/l2hsup/l2hinstall

Now check your installation on an example file. Open a new terminal/xterm/console/command window and enter:

tcsh
source ~/l2h/l2hsup/init
cd ~/l2h/l2hsup/check
latex index
latex index
If the file does not process correctly under latex, it has nothing to do with LATEX2HTML, only with your LATEX installation. See section 9.11 for the most common problems. If the file does process correctly under latex, make the web pages as follows:
l2h
Examine them in your browser to ensure that the math formulae and the figure are there.

Normal usage of LATEX2HTML is similar. Put a copy of your LaTeX document, renamed to index.tex in a suitable folder of its own, and add copies of all required figures and files to the same folder. Open a new terminal/xterm/console/command window and enter:

tcsh
source ~/l2h/l2hsup/init
cd folder_name_with_index.tex_in_it
latex index
latex index
l2h

Now proceed to section 8, “Usage”. Or if your LATEX is incompatible with TeXlive, proceed to the full installation section 7.2.4, point 5 and following.

Uninstall: This install makes zero changes to your system. If you want to uninstall, simply delete the l2h directory in HOME and the zip file, and it is completely gone.

To obtain the unmodified LATEX2HTML version 99.2 source, simply unzip without using the l2hinstall script. The unmodified sources are in l2h/l2hins and can be compared to the fixed-up ones found in l2h/l2hsup/l2hmods.

7.2.2 Introduction to the full install

Note: The software described on these pages is no longer supported. Do NOT follow the instructions here. To obtain the fixed up version of LATEX2HTML described here, go to either http://www.eng.fsu.edu/~dommelen/l2h or http://www.dommelen.net/l2h.

As you will see, the installation is not for the unsophisticated, though easier than the original stand-alone LATEX2HTML. I am assuming someone using Unix is a lot more sophisticated than a typical Windows user. If you are unexperienced in Unix, get someone to help you.

As detailed in section 3, support is limited. I will gladly explain anything that may be unclear in the installation procedure below, and how it worked for me on Sun Solaris and Centos. But I do not have access to other versions of Unix or Mac OS. I also never figured out Mac OS; it is all too far hidden away. Maybe with OS X, you could use either the DOS or the Unix scripts to run latex2html, since it has a Unix engine and, I believe, a DOS emulator. If you want to work with me to get this stuff working on non-Intel linux or Mac OS X, I am willing. Contact me, section 3.


7.2.3 Prerequisites

Note that your Unix system needs to be set up to run perl on scripts with a perl header line. Apparently, some systems do not. Complain. But not to me.

Before you can install LATEX2HTML and the LATEX2HTML-FU fixes, you need to have the following list of required programs already installed, and running correctly. If your installation is old, upgrade to the latest version. (If you ever run into trouble with one of them, try the version I am using and see whether it resolves the problem.)

Since I do not have system privileges on the Unix cluster that I use (Sun Solaris), I am simply using the versions that are there, with the noted exceptions.


7.2.4 Installation

Note: Much of what is in this section is outdated. For current software and its usage instructions go to either http://www.eng.fsu.edu/~dommelen/l2h or http://www.dommelen.net/l2h.

Next, perform the following steps. Note that I am using tcsh, but feel free to use csh instead. Also, use your favorite editor if for some weird reason it is not emacs.

  1. You need to decide on a top directory for the LATEX2HTML files. I use $HOME/l2h, which I created using mkdir. You could just use $HOME, for a single user setup. For a multiuser setup, /usr/local/l2h springs to mind. In any case, enter:
    tcsh  (or csh)
    setenv L2HTOP $HOME/l2h   (or whatever)
    mkdir $L2HTOP   (if you did not already)
    cd $L2HTOP
    mkdir l2hsup   (if you did not already)
    mkdir l2hsup/unzip
    mkdir temp
    setenv PATH "$L2HTOP/l2hsup:$PATH"
    rehash
    cd l2hsup
    Make sure that L2HTOP/l2hsup is at the start of your path, or you may use the wrong netpbm files from /usr/local/bin or wherever instead of l2hsup. This will interfere with the netpbm capabilities tests during the configuration, causing misconfiguration.

  2. I recommend you put copies of the following 16 netpbm utilities into directory l2hsup. (See subsection 7.2.3 on the recommended procedure to build them, but even if you decide to use preexisting ones in /usr/local/bin or wherever, I still recommend to put copies in l2hsup, they are small):

    anytopnm bmptoppm giftopnm jpegtopnm pamflip pbmmake pnmcat pnmcolormap
    pnmcrop pnmfile pnmflip pnmremap pnmtops ppmtobmp ppmtogif ppmtojpeg

  3. You will now need to put various required files into the created “unzip” subdirectory. Right click the next links to get your browser to save them as files. Of course you need LATEX2HTML, and you need version 99.2. Do not even think of trying another version. For your convenience, I have a zipped version here. And you need my fixes, which are here. Finally, you need a csh script “unzipit” to put various things into their right places. It is here. Make sure it is saved with name “unzipit”, not “unzipit.htm”; you may need to put it in quotes.

  4. In tcsh,
    cd unzip
    chmod a+x unzipit
    ./unzipit
    This will check your files and put various things in their right places. If all goes well, it will say so. If you see stars, something is wrong. Any files missing or names mistyped? Examine the unzipit script in emacs, if needed.

    Still in tcsh,

    rehash

  5. In tcsh,
    cd $L2HTOP/l2hsup
    emacs latexl2h      (or nedit latexl2h; may want to append & in X-windows.)
    You need to add two lines to this file, at the places indicated in the file. First a line that adds “..” to TEXINPUTS. See your LATEX documentation on how to do this, If you use teTEX/ TEXlive, you might try the following line, which works fine on our teTEX system (it is already in the script, just uncomment it:)
    setenv TEXINPUTS :..:.   (or, see below, setenv TEXINPUTS :..:.:$L2HTOP)
    Second you need to add a line that runs LATEX 2e on the parameters $1...$9, probably just
    latex $1 $2 $3 $4 $5 $6 $7 $8 $9
    See your LATEX documentation or the hints in the Windows 98 subsection if you run into trouble with these two lines.

  6. in tcsh,
    cd test
    ./test
    If all is well, test will run LATEX a couple of times. The second time there will be an undefined variable \alliswellthatendswell. This is intentional, just check that the LATEX identifies itself as “LaTeX2e” and enter “x”. If execution ends in the message “Test seems fine.”, and it ran 2e, proceed to the next item. Otherwise, change script latexl2h (not test) until it works as described. Do not move test2.tex. See the Windows install section for more if needed.

    If LATEX 2e is not run using the command latex on your system, on a piece of paper, write down the command that does run it.

  7. Now you need to find how to run dvips on your system. In tcsh:
    dvips -Ppdf -E index > tmp.ps
    You may need to specify an other command than dvips. In that case, write it down on a piece of paper. If dvips answers but complains about the -E (eps files) option, you want to consider upgrading to version 5.8.3. To see the current version number, use
    dvips -v
    If dvips does not know the pdf printer, your formulae are not going to be as sharp as they could be. Consider installing just the dvips part of TEXlive. Yes, I know. Otherwise leave out “-Ppdf”.

  8. You need to find out how to run the TEX executable on your system. In tcsh, try
    tex index
    If TEX answers, and complains about the LATEX, all is OK; just enter x to exit. Otherwise, just write down the same executable as used for LATEX for both TEX and iniTEX below and don't use the stupid -ldump option of LATEX2HTML. It is not going to save any time anyway.

  9. You need to figure out how to run iniTEX on your system. In tcsh, try
    initex index
    Write it down if not initex.

  10. You do need to find the way to run ghostscript on your system. In tcsh, try
    gs -version
    If ghostscript answers, the way to run ghostscript is “gs”. We have version 8.00. Otherwise, write it down.

  11. You need to find out how to run perl on your system. In tcsh, try:
    perl -v
    If perl answers, the command to run perl is perl. Otherwise write the correct command down. We have version 5.6.1. Also check that it is a good perl, not the junky one that comes with some version of TeX:
    where perl
    which perl
    which perl should normally return /usr/bin/perl, not some TeX version of perl. If necessary, reorder your PATH to move /usr/bin in front of TeX directories.

  12. In tcsh, do
    cd ../doc
    make
    This compiles the fortran using g77. There will be some warnings about possible uninitialized variables, but they are in fact correctly initialized. Note that I have set the l2hcrop variable bufdim in l2hcrop.f to use 2 Mb of memory. The intention is to avoid running the Netpbm utilities pnmcrop and pnmflip as much as possible, minimizing potential wrong-version problems. However, if this amount of memory use is a problem on your system, you can reduce the value by up to a factor 10 or so, and pnmcrop and pnmflip will take over for the bigger images.

  13. In tcsh, do
    cd subbin
    make
    cd ../dojpegs
    make
    cd ../../wzs
    make
    This creates other needed programs.

  14. In tcsh, do
    cd ../../l2hins
    Read the license and other important documents.

  15. In tcsh, do
    more INSTALL  (ignore whatever it says in this file, anyway)
    emacs prefs.pm
    You want to make the minimum changes you can; after everything works correctly, you can always go back and play around.

    Do not touch the $prefs{'TEXLIVE'} = 'no'; line even if you have TEXlive.

    Find the TEX line, starting with $prefs{'TEX'} and change tex into the way to run the TEX executable on your system you found earlier, if it was different from tex.

    Change the INITEX line a few lines below correspondingly. (If you need to append an option to the command, do not do that here. Instead edit file l2hconf.pin and add the option behind @INITEX@ a few lines down in that file. Return to file prefs.pm.) File prefs.pm cannot deal with multi-word commands.

    Set the value of TEXPATH into the folder where you want the \usepackage packages that come with LATEX2HTML to be put. This can be any of the TEXINPUTS directories except the . or .. ones. In the same place as “article.cls”, the article-style class file, would be a pretty sure bet. In teTeX, you may want to leave it blank and configure might figure it out by itself. When in doubt, leave it $ENV{L2HTOP} and move the files from there to an appropriate directory in the search path after running the install procedure. I leave them in $ENV{L2HTOP} since I have no prileges to move files into system directories and set my TEXINPUTS to :$L2HTOP so that TEX can find them. Note that this means that the TEXINPUTS line in my latexl2h file, as edited above, is really

    setenv TEXINPUTS :..:.:$L2HTOP

    Change the value of DVIPS to what you found.

    If you found that the pdf printer did not work, remove -Ppdf from the DVIPSOPT pref. In that case you may eventually want to experiment with the next three options to try to improve the quality of math images.

    If your dvips did not do eps, set EPS to 0 instead of 1.

    Change the GS ghostscript option if different. Change all three, just to be safe.

    Set TMPSPACE further down to the location where you want temporary files to be put. These can be big.

    Save prefs.pm.

  16. In tcsh,
    chmod a+x configure
    ./configure -help | more   (ignore whatever it says, anyway.)
    rm config.log cfgcache.pm
    ./configure
    If this terminates in an error message, try to solve it by making appropriate changes in file “prefs.pm”. Repeat from rm config.log cfgcache.pm.

    If your ghostscript is recent and it complains about GS_LIB, it may be ignorable. Try gs -h and see whether gs can find the ppm device.

    If it gives an uninitialized string error combined with the note that it cannot do pict format, I ignore it since I do not use pict graphics.

    If you get to the stage where it creates “cfgcache.pm” to “Makefile”, carefully examine the log file “config.log”. If you get “no”s, investigate before proceeding to the next item.

    Also examine “cfgcache.pm”.

  17. In tcsh,
    make
    make check

  18. You are now ready to test for basic operation. In the xterm window, enter:
    make test
    If it freezes at some stage, have a look at what is in the $L2HTOP/temp directory for a clue, and try hitting the Return key. If it just complains about aux file l2htest, but tells you to view results with your browser, do so. (You may need to browse down to the file, instead of using the given link.) The web pages should look rough, but correct. If not, I recommend pulling a lot on your hair. One thing you could do if you have used all your hair, is to examine whatever is in the $L2HTOP/temp directory. Script latexl2h that you modified earlier puts some error info there if errors occur.

    Carefully examine file l2hconf.pm for problems.

  19. If the test web pages are correct, in tcsh
    make install
    rehash
    This will put the various LATEX2HTML files in the l2h directory, and the style files in the TEX path.

  20. Get rid of the junk. In tcsh
    cd $L2HTOP
    rm -r texinputs

  21. Move the various .sty files into the right locations in the TEX search path, if it was not specified in prefs.pm. Try running LATEX on a document with a \usepackage{html} in the preamble; it should be able to find that package. Otherwise try moving it in with the article.cls file of LaTeX. Or, for teTeX, you could leave them in $L2HTOP and tell the users in their .login or .[t]cshrc to set
    setenv TEXINPUTS :$L2HTOP
    In that case. you want to set
    setenv TEXINPUTS :..:.:$L2HTOP
    in file l2hsup/latexl2h. That is what I do, since I have no privileges to move things into the TEX directory tree. A good test file is $L2HTOP/l2hsup/check/index.tex. If that file processes OK in LATEX, try converting it to html using the l2h command. If it does not process correctly in LATEX, it is a problem in LATEX, not LATEX2HTML. You may need to install packages or run mktexlsr.

  22. (If your dvips does not do eps, you can skip this item.) You want to create an option to deal with the occasional buggy figure, such as some figures using \special. Execute the command:
    $L2HTOP/l2hsup/var/creaneps

  23. In a multiuser setup, remove directory temp from $L2HTOP, and tell each user to create a directory temp (case sensitive) in their HOME directory. Also tell them to setenv L2HTOP and to prefix it to their PATH, and if necessary, to setenv TEXINPUTS. Tell them the location of this document.

  24. Unfortunately, the installation must be repeated from the ./configure stage if the physical location of $L2HTOP changes. This is due to the fact that noninterpolated strings are used deep inside the numerous perl scripts. If you leave l2hins as is, this will be easier.

  25. You may want to delete the .zip files from l2hsup/unzip and the jpeg and netpbm installation trees when all is well to recover disk space.

If you have information that may be helpful to others for installing, e-mail me, section 3, including your flavor and version of TEX and I will add it to this document.

If there are errors in the installation procedure, please let me know; I will correct them immediately.

7.2.5 Warnings for Unix users

Unix users should note the following differences in usage from Windows ones:

Have a look at manual.pdf and hthtml/index.html in the docs subfolder of l2h. Then proceed to usage section 8.