Expand description
A format dump for the TeX tree this process reads.
A dump is the format: the state latex.ltx (and the L3 kernel it loads) or plain.tex leaves,
built from one TeX tree’s files. Packages come raw from the tree the process reads, so a dump
built from another tree is the wrong format for them — expl3.sty refuses a format whose L3
kernel date differs from its own (“Mismatched LaTeX support files”, expl3.sty:64-78). The 2609
release ran a dump built from /usr/local/texlive/2025 with /usr/share/texlive’s packages, and
12,144 papers ended as Error (witnesses 2607.28725, 2609.40175).
Every dump records the files it was built from, and the loaders pass over one this tree does not
have (latexml_engine::dump_paths::dump_matches_tree). When no dump found matches, the format
is built here once, as --init and fmtutil build it, into a per-user cache keyed by the engine
build and the tree’s files, and that dump is used. When it cannot be built, the format loads
from the engine’s own definitions, LoadFormat’s branch for a missing dump (Perl
Package.pm:2755-2766).
Functions§
- cancel_
builds_ on_ interrupt - Makes an interrupt that ends this process while it builds a format dump a cancellation, not a
failed build (issue 988): the build’s attempt note goes back to what it held before the build,
its partial dump is removed, and the process exits with status 130. The next process builds the
format again, where an interrupted build used to count towards marking it failed (
.failed.<kind>), so two interrupts left every conversion for a day on the engine’s own definitions. The interrupts are Ctrl+C and, on Unix, SIGTERM and SIGHUP (on Windows, Ctrl+Break and closing the console). For a front end its user interrupts (thelatexml_oxideCLI’s conversions); an embedder that handles signals itself leaves it off. The handler is installed when the process starts its first build, so a process that builds nothing keeps its default interrupt. One that builds keeps the handler to its end: a later SIGTERM or SIGHUP ends it with status 130, not by the signal, since neither ctrlc nor a safesignal/sigactioncan put the default action back. A process that ignores or handles any of these signals already (nohup, a shell’s background job) keeps them as they are, and an interrupted build there counts as before. - ensure_
format_ dumps - Ensures each format has a dump built from this process’s TeX tree, building any that has none
into the cache. Once per process, before the first session loads a format; nothing to do without
a TeX tree, under
LATEXML_NODUMP, or while a format is being built (--init, or the thread building one here). A format that cannot be built is reported once, as a Warning on stderr (not under--quiet) and in each conversion’s log (converter::note_format_build_failure), and loads from the engine’s definitions. A build changes the process’s working directory while it runs (seebuild), so it belongs before the process converts anything.