TeX4ht

TeX4ht is a system for converting documents written in TeX/LaTeX/ConTeXt/etc. to HTML, various XML flavors, braille, etc., optionally using MathML.

Features

Project repository and discussions

Documentation and tutorials

Tools

Basic invocation for modern output

TeX4ht can be invoked in several ways. Original way is to use the htlatex command. To convert a LaTeX source file.tex to HTML5 that uses UTF-8:

$ htlatex file.tex "xhtml,html5,charset=utf-8" " -cunihtf -utf8"

N.B. That command line has three arguments, the second two given inside shell quotes; the last argument starts with a space. More details on calling conventions.

An easier way is to use make4ht (see its documentation for more). The following command produces the same output as the previous one, HTML5 in UTF-8 encoding:

$ make4ht file.tex

Bug reports

Bug reports are welcome by email or by submission to the bug database. Please include a complete source document and the exact program invocation, as well as what goes wrong. To fix the problem we need to be able to reproduce it. If the problem remains unresolved, please submit it to the bug db, so it won't be forgotten.

Development status

We continue to install updates in the tex4ht development source and propagate them to TeX, although we have not made a full release in tex4ht. Some development changes remain solely in the source repository.

TeX4ht was created by Eitan Gurari at Ohio State University. Eitan died unexpectedly in June 2009; we extend our sympathies to his family, and dedicate future work on the project to his memory.

With the encouragement and support of Eitan's family, Michal Hoftich, Karl Berry, and others have continued to work on TeX4ht. Involvement by other volunteers, from bug reports to major new development, is welcome and needed.

No full post-Eitan release has been made to date. This continues to be a work in progress.

ChangeLog

Latest changes (full ChangeLog):

2020-10-18

tex4ht-4ht.tex (minted-sty-hooks.4ht): fixed the breaklines option handling.

2020-10-17

tex4ht-4ht.tex (usepackage.4ht, graphics-hooks.4ht): adapted Graphics for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, xcolor-hooks.4ht): adapted Xcolor for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, caption-hooks.4ht): adapted Caption for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, pdfbase-hooks.4ht): adapted Pdfbase for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, tikz-hooks.4ht): adapted Tikz for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, fontspec-hooks.4ht, polyglossia-hooks.4ht): adapted Fontspec and Polyglossia for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, ctex-hooks.4ht): adapted Ctex for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, xecjk-hooks.4ht): adapted xeCJK for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, xecjk-hooks.4ht): adapted xeCJK for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, savetrees-hooks.4ht): adapted savetrees for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, expl3-hooks.4ht): adapted expl3 for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, showframe-hooks.4ht): adapted showframe for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, esopic-hooks.4ht): adapted eso-pic for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, xrhyper-hooks.4ht): adapted xr-hyper for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, xr-hooks.4ht): adapted xr for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, fancyhdr-hooks.4ht): adapted fancyhdr for the new package hook mechanism.

tex4ht-4ht.tex (usepackage.4ht, cleveref-hooks.4ht): adapted cleveref for the new package hook mechanism.

tex4ht-4ht.tex: added tutorial on how to write early package patching hooks.

tex4ht-4ht.tex (usepackage.4ht, imakeidx-hooks.4ht): adapted imakeidx for the new package hook mechanism.

Project repository.