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.
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.
(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,UMBIf 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.
Whether you want the easy install, or need to configure manually, everybody needs to follow the steps below:
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.)
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
.
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 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
.
C:\
drive by right-clicking
the appropriate link below and selecting “Save Target/Link
As.” Select the batch file from the following list:
l2hfu3.exe
and
l2hmtx.exe
in the previous step. (Do not use this script
with your own version of emTEX, in that case use
l2hingen
below instead.) Note that emTeX is no longer
compatible with current versions of LaTeX and limited to small
documents.
People with MiKTeX 2.5 downloaded late august 2006 or later please take note of the “html” package problem noted in subsubsection 9.20.12.
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:
C:\
folder.
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
Windows_98-ME
icon.
Windows_XP
icon.
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 l2hEnter 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”.
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.
C:\
drive, then the l2hsup
folder in it. (If you do not have the
l2hsup
folder, it is back to the second last subsubsection.)
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.)
DOSKEY /INSERT(This will allow you to correct typos with the arrow keys.) Leave the window as is for now.
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:
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.
c: cd \l2hsup\test dvips32 -Ppdf -E indexIf 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.
tex indexIf 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.
initex indexOn my system, iniTEX is run by adding a
/i
behind the TEX executable tex386
. On some systems,
that is -ini
instead.
gswin32cIf 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\gswin32cYour version numbers are likely to be different. Write down how to run ghostscript after you get it to work.
perl -vIf perl answers, the command to run perl is
perl
(without
the “-v”). On my system, it is
C:\Perl\bin\perl.exe
.
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.
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.
SET RSXOPT=-Re0
to turn it off.
c: cd \l2hins del config.log configIf 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.
testIf 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.
installThis will create the folder “l2h” on the C: disk.
c: cd \l2h C:\l2hsup\var\deldir texinputs
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.
\special
.
C:\l2hsup\var\creanepswhich 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.
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.
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.
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 -vIf 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 indexIf 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:
l2hExamine 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.
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.
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.
There is really no need to do so, however, since there is a big set of ready-to-run binaries for almost any conceivable system here.
You should also have zip in your path for the makezip utility to work, though you can live without this utility.
perl -v
to check.)
pnmcolormap
and pnmremap
programs, which do the reduction
in number of colors that allow the gif images to be made of the formulae
and figures.
So, I created my own updates of the more essential binaries. Below is a log of my inputs. These are not installation instructions, just a basis for comparison. For example, you may have to specify gmake instead of make.
Also, you may want to install the l2h directory tree elsewhere than in your home directory. For example, this would apply for a multi-user setup.
I do however recommend that you try to install the same
version of the utilities in the same way. It is the only way to
have some confidence that the installation will work correctly, and
will still work correctly next year. It may duplicate a few netpbm
utilities in /usr/local/bin
, (16 of them, to be exact, all
critical to LATEX2HTML), but they are very small files anyway.
Versions that are too early will simply not work correctly. Versions that are later versions than when LATEX2HTML was written also do not work, since the program requires specific behavior, and netpbm is in a constant flux of change. (As far as I know, the current version of netpbm at the time of this writing, 2004-5, does work, but that is only because I fixed the problems. They do not work correctly with the official distribution.)
You do not want to come back next year if someone upgraded netpbm in
/usr/local/bin
, or just moved the files or libraries, and
do this all again.
For your convenience, a zipped version of the required version netpbm sources is here, and the jpeg library is here.
My netpbm install log follows now:
tcsh mkdir $HOME/l2h mkdir $HOME/l2h/l2hsup mkdir $HOME/work cd $HOME/work [put the netpbmux.zip and jpegux.zip in this directory] unzip jpegux tar xvf jpegsrc.v6b.tar cd jpeg-6b/ more install.doc ./configure make [lots of verbosity, but it produces the file] cp libjpeg.a ~/l2h/l2hsup/ cd .. unzip netpbmux tar xvf netpbm-10.18.18.tar cd netpbm-10.18.18/ more doc/INSTALL ./configure Platform [?] ==> sun gcc or cc [gcc] ==> regular or merge [regular] ==> static or shared [shared] ==> static library filename or 'none' [libjpeg.so] ==> /home/e121/dommelen/l2h/l2hsup/libjpeg.a JPEG header directory [default] ==> /home/e121/dommelen/work/jpeg-6b library filename or 'none' [libtiff.so] ==> none library filename or 'none' [libpng.so] ==> none library filename or 'none' [libz.so] ==> none Documentation URL [http://netpbm.sourceforge.net/doc/] ==> cd converter/other make bmptopnm make giftopnm make jpegtopnm make pnmtojpg make pnmtops mv anytopnm jpegtopnm giftopnm pnmtops ~/l2h/l2hsup mv bmptopnm ~/l2h/l2hsup/bmptoppm mv pnmtojpeg ~/l2h/l2hsup/ppmtojpeg cd ../ppm make ppmtobmp make ppmtogif mv ppmtobmp ppmtogif ~/l2h/l2hsup cd ../../generator make pbmmake mv pbmmake ~/l2h/l2hsup/ cd ../editor make pamflip make pnmcat make pnmcrop make pnmflip make pnmremap mv pamflip pnmcat pnmcrop pnmflip pnmremap ~/l2h/l2hsup cd ../other make pnmcolormap mv pnmcolormap ~/l2h/l2hsup/ cd ../analyzer make pamfile mv pamfile ~/l2h/l2hsup/pnmfile
I recommend that you back up the created binaries to a safe location to avoid having to do this again later if a disk crashes.
(I really think it is quicker to install the compiler if you do not have it, than to adjust the Fortran files in the doc subdirectory to read and write files without new lines and record boundaries (fgetc and fputc in g77), and to accept command line parameters the same way as g77. Though I guess it could be done; Watcom can do it using unformatted I/O with a declared recl of 1 and library functions. You could live without l2hnewer.f if you give up the convenience features. Or use the script version if you have newer from texlive. L2hcrop.exe and l2hcomp.exe are the very core of LATEX2HTML-FU; without them, it is a pretty useless fix.)
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.
$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 l2hsupMake 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.
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):
cd unzip chmod a+x unzipit ./unzipitThis 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
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 $9See your LATEX documentation or the hints in the Windows 98 subsection if you run into trouble with these two lines.
cd test ./testIf 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.
dvips -Ppdf -E index > tmp.psYou 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 -vIf 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”.
tex indexIf 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.
initex indexWrite it down if not
initex
.
gs -versionIf ghostscript answers, the way to run ghostscript is “gs”. We have version 8.00. Otherwise, write it down.
perl -vIf 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.
cd ../doc makeThis 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.
cd subbin make cd ../dojpegs make cd ../../wzs makeThis creates other needed programs.
cd ../../l2hinsRead the license and other important documents.
more INSTALL (ignore whatever it says in this file, anyway) emacs prefs.pmYou 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
.
chmod a+x configure ./configure -help | more (ignore whatever it says, anyway.) rm config.log cfgcache.pm ./configureIf 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”.
make make check
make testIf 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.
make install rehashThis will put the various LATEX2HTML files in the
l2h
directory, and the style files in the TEX path.
cd $L2HTOP rm -r texinputs
\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 :$L2HTOPIn that case. you want to set
setenv TEXINPUTS :..:.:$L2HTOPin 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
.
\special
.
Execute the command:
$L2HTOP/l2hsup/var/creaneps
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.
./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.
.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.
Unix users should note the following differences in usage from Windows ones:
l2h
for the first time, set the
location of the LATEX2HTML-FU files and add the executables to
your path with:
setenv L2HTOP $HOME/l2h setenv PATH "$L2HTOP/l2hsup:$PATH" rehash(or substitute wherever the top of the directory tree is if not
l2h
in the home directory.) You probably want to put
the first two commands in your .login
file, so that you do not
have to do them manually each time you login to csh. Make sure
that L2HTOP/l2hsup
is before other parts of the path
that may have netpbm files of the wrong version number.
L2HTOP
should not have a a
temp
directory.)
L2HTOP/
where Windows users have
C:\
and forward slashes for backward ones. But since you
already have L2HTOP/l2hsup
in your path, you typically can
omit this from commands.
setenv
instead of set
,
omit the equals sign, and quote the string, e.g.
setenv L2H_BROWSER c
.latex2html-init
is a hidden file on Unix.
But it is there, just do ls -a
.
l2h
, makel2h
, or the wiz
mess up
your terminal (or xterm window), use the l2hexe
,
makel2hexe
, and wizexe
versions instead. The exe
versions do not try to use line editing, so will not mess with your
terminal screen. Correcting typos will be less convenient: no arrow
keys.
Have a look at manual.pdf and hthtml/index.html in the docs subfolder of l2h. Then proceed to usage section 8.