html2tex Version 2.0

This page describes version 2.0 of html2tex, a program that converts a collection of related HTML files into a single LaTeX file. (Current version is version 2.6.) Such a LaTeX file can be processed into a PostScript file. To generate a single LaTeX file from a number of HTML files, the user needs to give a skeleton LaTeX file and indicate where translated versions of the HTML files should be included. The user also has to specify at for each HTML file at which level (chapter, section, subsection, ..) it should be included. Links between the different HTML files are mapped to references in the LaTeX.

The program does extensive checking of links between the different files. Because of this reason it can also be used as a link checking program, by giving it a single HTML file, and specify that it should scan all referenced pages in the local directory (and its sub-directories).

Links to excluded HTML files (and other URL's) can either be reported as footnotes, or as a sorted bibliograph in the LaTeX file. Error messages are reported on the standard output file, and in a cross-reference file that is generated along side.


The HTML to LaTeX conversion program is implemented by the C program html2tex.c, which needs to be compiled first. (The program is developed with the popular gcc compiler, which is freely available under the GNU public license.)

The program takes a single file as input. This should be a skeleton LaTeX file without any extension (or, if the program is only used for link checking, a HTML file with the extension .html) It will generate an LaTeX file with the same name as the input file, but with the extension .tex.

The input file

The input file should contain valid LaTeX commands. In the file all lines starting with %html will be interpreted as special lines by the conversion program. These are used to indicate which HTML files should be included, and to set the various options. The following special commands are recognized by the html2tex:

Besides the LaTeX file that is generated, the program will also generate a cross-reference file with the .ref extension, that contains alot of usefull information.

Program options

If the program is given an input file with the extension .html, it does not generate a LaTeX output file, but only analyse the file, and the files it references (if the -s option is given).

The program recognizes the following command line options:

Known bugs

Revision history

November 11, 1995: Beta of Version 2.0

July 6, 1995: Version 1.0

May 2, 1995:

March 3, 1995:

June 8, 1995:

Last update: November 22, 1995
HTML tools page | Versions 2.1 and up | home page