Expand description
latexml-oxide converts LaTeX documents into HTML5 with MathML, XML and EPUB 3: a Rust port of
LaTeXML. This crate, published as latexml, holds the command-line
binaries latexml_oxide and latexmlmath_oxide and the library that drives a conversion. Its developer binaries
(genschema_oxide, the audits, cortex_worker) install from a source checkout with --features extended-install.
api: the stable entry points,convert_to_xml,convert_to_htmlandconvert_to_html_with.converter::Converter: a full conversion with its own configuration (preloads, search paths, split, …).post: the post-processing to HTML, XHTML or EPUB (Perl’slatexmlpost).format_dumps: the format dumps embedded in the binary or built once for the host TeX tree.environmentandintermediate_files: every environment variable read, and every file written.
The engine is in latexml_core and latexml_engine, the bindings in latexml_package and latexml_contrib,
the math parser in latexml_math_parser and the post-processors in latexml_post. Start with the
README and USAGE.md.
Modules§
- alloc_
hook - The binaries’ global allocator: an allocator that ends the process through the binary’s allocation-failure hook
(
latexml_core::watchdog::alloc_failed) when an allocation returns null. It replaces the nightly-onlystd::alloc::set_alloc_error_hook(issue #143): the hook’sFatal:oom:alloc_failedline and exit 137 are kept for every allocation, and a fallible one (try_reserve, std’sfs::read) now ends the same way instead of returning an error.cortex_worker’s address-space cap (--child-mem-limit-mb) reaches the hook through it. - api
- Stable, high-level conversion API for using
latexmlas a library. - bib_
session - The recursive BibTeX session behind post-processing’s bibliography.
- converter
- core_
interface - environment
- Environment variables
- format_
dumps - A format dump for the TeX tree this process reads.
- heap_
trim - Handing freed heap memory back to the OS on long runs.
- identity
- Per-conversion identity banner — executable name, version, git revision and exact start time, logged once at the head of every conversion so any log names the precise binary and moment that produced it.
- ini_tex
- Format dump mode — Rust equivalent of Perl’s iniTeX + DumpFile.
- intermediate_
files - Intermediate files
- lsp_
server - Persistent server for editor/preview integration (
latexml_oxide --server). - main_
tex - Main
.texdiscovery for directory inputs. - multidoc
- In-memory join of multiple core-XML documents into one.
- post
- Post-processing pipeline API.
- render_
workers - Process-parallel page rendering for pass B of the post pipeline
(
docs/archive/STREAMING_POST_DESIGN_2026-07-06.md§6). - source_
date - The date of a paper’s source: the newest modification time among the TeX source files of the bundle it came in
(
Config::source_date_epoch), the clock ar5iv’s archival preload gives the job so\todayprints the paper’s own date — the one arXiv’s PDF shows — and never the conversion’s (user ruling 2026-10-10). - streaming_
restart - Eager →
--streamingrestart policy shared by the CLI andcortex_worker(batches 56dw/56dz): when to stream up front (resolve_streaming, the source-size projection), where an eligible eager run stops to rerun (restart_watermark, nine tenths of the memory fuse), whether a finished eager attempt asks for the rerun (restart_budget), and the memory release the rerun needs first (release_before_rerun). - util
Functions§
- dump_
compiled_ latexml_ model - Load the embedded LaTeXML schema and return its compiled-model
serialisation in the
.modelplain-text format. Used bytools/compileschema.shstage 2 (and the--dump-modelflag on thelatexml_oxidebinary) to regenerateLaTeXML.modelfrom the same source the runtime sees. - load_
latexml_ default_ model - Load the embedded LaTeXML schema (compile-time) into the runtime
MODEL. Single home for theload_model!("LaTeXML")macro expansion — the macro generates a fresh_ModelLoader::build_modelat each call site (~600 KiB of.textper copy), so funnelling all callers through this one function lets LTO keep exactly one instance in the final binary. Mirrors PerlLaTeXML::Common::Model::compileSchema(Model.pm L121-136).