# TeX4ht: LaTeX and TeX for Hypertext

TeX4ht is a highly configurable TeX-based authoring system dedicated mainly to produce hypertext. It interacts with TeX-based applications through style files and postprocessors, leaving the processing of the source files to the native TeX compiler. Consequently, TeX4ht can handle the features of TeX-based systems in general, and of the LaTeX and AMS style files in particular.

Pre-tailored configurations are offered for different output formats, including (X)HTML, MathML, OpenDocument, and DocBook. This document and the utility code are available for downloading in zipped format.

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

trouble shooting | Q/A | common problems for MathML

## Using the System

Typical LaTeX source files 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 filename "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.
- Fabrice Popineau, Affichez vos documents LaTeX sur le Web avec TeX4ht, Cahiers GUTenberg 37–38, December 2000, 5–43 (French, PDF).
- Gustavo Cevolani, Introduzione a TeX4ht, Proceedings of the 2004 Italian TUG meeting.
- Within the current document.
- Conference presentations

## 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 upgrade it with the files 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 compilations through command lines but graphical user inferfaces may also be employed.

Philip A. Viton discusses in details issues of installing TeX4ht under MikTeX and Scientific 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 reflect 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 specific issue of the code. The leading lines in the files indicate how the files can be compiled.

trouble shooting| bug fixes

## 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 file illustrating the issues involved, but do not include bitmap files loaded by the sources (e.g., PNG files). Since similar constructs are introduced within different style files, a minimal source is required for correctly pinpointing the definitions 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 configurations participate in the translation.

- Occasionally it might also be useful to have an URL to a public domain where the files and messages produced during the compilation can be viewed. Unless explicitly requested to to do so, please don’t email such information.

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

## Resources

Languages: | LaTeX/TeX, HTML, XML/XSLT, MathML, OpenDocument, DocBook, TEI, Style Sheets, Validators
Converters into HTML/XML: | BibHTML 1, Bib2HTML 2, Bib2HTML 3, Bib2XHTML 4, Bib2ML 5, BibTeX2HTML 6, BibTeX2HTML 7, Dlh 8, GELLMU 9, Hermes 10, HEVEA 11, HTeX 12, HtmlTeX 13, HTMX 14, HyperLaTeX 15, HyperTeX 16, Itex2mml 17, LaTeXML 18, LaTeX2HTML 19, LaTeX2man 20, LaTeX4Web 21, Ltoh 22, Ltx2x 23, MathTran 24, MicroPress TeXpider 25, ORCCA 26, plasTeX 27, RichDoc 28, Selathco 29, SnuggleTeX 30, TeX2HTML 31, TeX2Page 32, TeX2RTF 33, tex2sdoc 34, Texi2HTML 35, TeXPort WEB 36, TexToWebPublishing 37, Tralics 38, Tth 39, Vulcanize 40, WebEQ 41, LaTeX on Web pages 42, jsMath 43
Backward Converters: | Gf 1, Htex 2, HTMLtoLaTeX 3, HTML2LaTeX 4, HTML2LaTeX 5, HTML2LaTeX 6, HTML2TeX 7, JadeTeX 8, Passive TeX 9, SGML2TeX 10, TeXML 11, TeXML 12, TypeHTML 13, Word-to-LaTeX 14, Writer2LaTeX 15, W2LTX 16, XMLTeX 17, Brute Force 18
Converters for other formats: | Dvi2bitmap 1, Dvi2Svg 2, Dvipdfm 3, dvipng 4, DviSvg 5 , DviSvgm 6, GrindEQ 7, MimeTeX 8, ltx2rtf 9, PdfTeX 10, LaTeX to ... 11

## 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 Carmen Fierro, Piotr Grabowski, Gertjan Klein, Sebastian Rahtz, and Philip Viton for extensive feedback and help at early stages of this project.

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

Eitan M. Gurari
gurari@cse.ohio-state.edu
June 16, 2008