The HaTeX manual
HaTeX turns LaTeX (articles and beamer slides) into HTML in the browser, or in Node at build time. This manual describes everything it does: what LaTeX it understands, how to put it on a page, the JavaScript API, styling, and what it deliberately leaves out.
The README is the short tour. docs/syntax.md is a one-page cheat sheet of the supported LaTeX. This manual is the full reference and explains how each feature behaves and why.
Contents
Using HaTeX
- Getting started: loading the files, a first page, where the source can come from, and serving locally
- Papers: conference templates, the title block, citations from a
.bibor.bbl, and putting an arXiv source on the web - How HaTeX reads a document: the preamble, comments, paragraphs, sectioning, text formatting, lists and Chinese documents
- Maths: inline and display maths, numbered environments, macros and what KaTeX can't do
- Tables:
tabularand its relatives, rules, spans, colours and fitting wide tables - Figures and images:
\includegraphics, floats, captions, sub-figures and minipages - TikZ: how pictures are compiled, pre-rendering, libraries, pgfplots, tikz-cd and the neural-network styles
- Theorems, proofs and algorithms
- Code: listings, minted, verbatim and syntax highlighting
- Cross-references, citations and footnotes
- Two columns and multicols
- Slides: beamer frames, the title page, blocks, columns, aspect ratios and presenting
- Vertical Chinese:
guji,verticaland\jiazhu
Integrating HaTeX
- JavaScript API: every function, option and event
- Theming: the CSS variables, dark mode and fonts
- The HTML output: the structure and class names the renderer produces, for styling and scripting
- Node, bundlers and static sites
- Checking sources:
HaTeX.lintandHaTeX.images
Reference
- Limitations and troubleshooting
- Developing HaTeX: the source layout, building and releasing
Conventions
- "The source" is the LaTeX text you hand to hatex. "The root" is the element that the output goes into; it always carries the class
hatex. - Commands are written as you would type them in LaTeX, e.g.
\section{…}. Optional arguments are in[…]. - Degrades means that the command is not understood and HaTeX keeps the text of its arguments instead of failing. Ignored means that the command and its arguments produce nothing.
- The examples use the files in
dist/. Everything described here is in version 1.11.2.