# TeX4ht: LaTeX and TeX for Hypertext

TeX4ht is a highly conﬁgurable TeX-based authoring system for producing hypertext. It interacts with TeX-based applications through style ﬁles and postprocessors, leaving the processing of the source ﬁles to the native TeX compiler. Consequently, TeX4ht can handle the features of TeX-based systems in general, and of the LaTeX and AMS style ﬁles in particular.

This document relates mainly to conﬁgurations tailored for different variants of HTML, MathML, OpenOffice, DocBook, TEI, and CSS. The document and code are available for downloading in zipped format.[unzip]

∙ Table of Contents ∙ Using the System ∙ Calling Commands ∙ Conﬁgurations ∙ Installation ∙ Bug Reports ∙ Resources ∙ License ∙ Acknowledgment ∙ Index

## Using the System

Typical LaTeX source ﬁles can be compiled into standard HTML and XML formats in a manner similar to the way they are compiled into print formats, namely, through variations of the command ‘htlatex ﬁlename "options1" "option2" "options3" "options4"’. For instance,

htlatex filename
htlatex filename "html,2,info" "dbcs/!"
htlatex filename "foo,frames" "" "-p"
htlatex filename "" " -ciso2htf" "" "-translate-file=il2-pl"
xhlatex filename
mzlatex filename
oolatex filename

In some platforms the double quotes should be replaced with single right-quotes, and in some cases they might be omitted.

For details, visit the calling commands section.

### References

The main features of TeX4ht are described in:

- M. Goosen and S. Rahtz with E. Gurari, R. Moore, and R. Sutor, The LaTeX Web Companion, Addison-Wesley, 1999 (German translation).
- Fabrice Popineau, Affichez vos documents LaTeX sur le Web avec TeX4ht, Cahiers GUTenberg 37–38, December 2000, 5–43 (French, PDF).
- Within the current document.
- Conference presentations
- In the .log ﬁles of the compilations.

## Installation

To be installed, the system needs a port made up of native utilities of TeX4ht and of non-native utilities. The easiest way to establish an up to date port is to download an installed distribution of the system, and refresh it with the ﬁles provided here.

Establishing ports from scratch for Unix and MS Windows require additional effort, mainly because of the need to set up non-native utilities. Alternative ports for these and other platforms can be tailored in a similar manner. The distribution assumes compilation through command lines but graphical user inferfaces may also be employed.

Philip A. Viton discusses in details issues of installing TeX4ht under MikTeX and Scientiﬁc Word/WorkPlace, but many of the topics apply also to other platforms. Steven Zeil offers improvements for the above settings.

The literate sources of TeX4ht are also available, but they are not needed for installing the system. The literate views are very far from being in a desirable state for a review by a public eye–they reﬂect their true nature as being privately used for developing and maintaining the available code. The views follow a basement mentality: throw in without much scrutiny any item of possible value at some point of time, and clean a corner when the need arises for working on a speciﬁc issue of the code.

trouble shooting | Q/A | bug ﬁxes

## Bug Reports

The development of the TeX4ht system is to a large degree driven by users’ bug reports and requests. In most cases, when providing feedback, it is essential to include the following information.

- A minimal miniature complete source ﬁle illustrating the issues involved. Since similar constructs are introduced within different style ﬁles, a minimal source is required for correctly pinpointing the deﬁnitions of the constructs involved in the translation.

- A mentioning of the command used to invoke the translation. This information is required since the command determines which conﬁgurations participate in the translation.

Translations of source ﬁles are centered around logical structures. Formatting instructions receive only limited attention.

## Resources

Languages: | LaTeX/TeX, HTML, XML/XSLT, MathML, DocBook, TEI, Style Sheets, DTDs, Validators
Converters into HTML/XML: | BibHTML 1, Bib2HTML 2, Bib2HTML 3, Bib2XHTML 4, BibTeX2HTML 5, Dlh 6, Euromath 7, GELLMU 8, Hermes 9, HEVEA 10, HTeX 11, HtmlTeX 12, HTMX 13, HyperLaTeX 14, HyperTeX 15, Itex2mml 16, LaTeXML 17, LaTeX2HTML 18, LaTeX2man 19, LaTeX2MathML 20, LaTeX4Web 21, Ltoh 22, Ltx2x 23, MicroPress TeXpider 24, ORCCA 25, pyLaTeX 26, Selathco 27, TeX2HTML 28, TeX2Page 29, TeX2RTF 30, Texi2HTML 31, Texi2www 32 , TeXPort WEB 33, TexToWebPublishing 34, Tralics 35, Tth 36, Vulcanize 37, WebEQ 38
Backward Converters: | Gf 1, Htex 2, HTML2LaTeX 3, HTML2LaTeX 4, HTML2LaTeX 5, HTML2TeX 6, JadeTeX 7, Passive TeX 8, SGML2TeX 9, TeXML 10, TeXML 11, TypeHTML 12, XMLTeX 13, Writer2LaTeX 14, Brute Force 15
Converters for other formats: | Dvi2bitmap 1, Dvi2Svg 2, Dvipdfm 3, DviSvg 4, MimeTeX 5, MimeTeX 6, ltx2rtf 7, PdfTeX 8, Plain2 9, LaTeX to ... 10
Conversion to Bitmaps | math on the web | web publishing with LaTeX

## License

TeX4ht is provided under the LaTeX Project Public License (LPPL).

## Acknowledgment

I am very grateful for the suggestions, contributions, and bug reports offered by many people. In particular, thanks go to Gertjan Klein and Sebastian Rahtz who got deeply involved in the project for long periods of time, to Carmen Fierro and Piotr Grabowski for extensive feedback regarding the MathML conﬁgurations, and to Philip Viton for his superb documentation.

This work is partially sponsored by NSF grant IIS-0312487.

Eitan M. Gurari
gurari@cse.ohio-state.edu
February 28, 2005