A Rust port of LaTeXML
latexml-oxide turns LaTeX sources into accessible web documents: HTML5 with MathML, XML, and EPUB 3. It powers the ar5iv Lab and the production arXiv HTML Papers, converting 98% of arXiv's articles without an error. The project is in public beta.
- LaTeXML is too slow for large-scale production use.
- Perl 5's ecosystem and tooling have aged out of the mainstream.
- LaTeXML is urgently needed for turning LaTeX sources into responsive, accessible web documents.
- Faithfully rewrite the LaTeXML code base, staying as close as possible to the original Perl sources.
- Use idiomatic Rust when possible, especially when refactoring Perl idioms.
- Carefully address the newly required resource constraints.
- Raise the coverage and fidelity of arXiv conversions beyond 98%.
Try it first, no install: latexml.rs/editor — type LaTeX, see the result live.
# A document → HTML5 with MathML (the output format follows the extension)
$ latexml_oxide paper.tex --destination=paper.html
# … or an EPUB 3 book
$ latexml_oxide paper.tex --destination=paper.epub
# A book split into one page per chapter
$ latexml_oxide book.tex --splitat=chapter --destination=book/index.htmlPackages and classes without a LaTeXML binding are read from their own .sty/.cls sources. --help lists every
option; docs/USAGE.md explains them.
Self-contained binaries for Linux, macOS and Windows are on the
Releases page; Homebrew, a .deb, Docker and
cargo install latexml work too. Raw packages, expl3 and fonts need a TeX installation (TeX Live or MiKTeX).
Minimum supported Rust version (MSRV): 1.100 (stable); nightly also supported. To build from source, rustup's default stable is enough (the
checkout's pinned stable installs itself); the nightly aliases (cargo +nightly nightly-build) give the fastest local
builds today, as stable has no parallel compiler frontend
(Toolchains).
Steps per platform, including how to run the unsigned Windows binary: docs/INSTALL.md.
Released binaries read TeX bindings written in Rhai, with no Rust toolchain. Put a
<pkg>.sty.rhai next to your document and \usepackage{<pkg>} loads it:
// mypkg.sty.rhai (backslashes are doubled in Rhai strings)
DefMacro("\\greet{}", |gullet, name| "Hello, " + name + "!");Start with the Rhai guide; the Perl | Rust | Rhai cheat sheet maps each Perl LaTeXML call to its Rhai form.
Installing · Usage · Changes · Rust API · all docs, by theme
latexml-oxide's source code and original resources are dedicated to the public domain under CC0 1.0 Universal.
The release binaries also embed or link third-party material under its own license: TeX Live's format dumps (LaTeX
kernel LPPL 1.3c; plain TeX, Knuth), libxml2/libxslt (MIT), libmarpa (MIT, with LGPL parts), libkpathsea
(LGPL-2.1), ar5iv.css (MIT) and, on Windows, GNU libiconv (LGPL-2.1+). The CC0 dedication covers only the
latexml-oxide source and original resources, not that third-party material. It is attributed in
THIRD-PARTY-NOTICES, which ships with every download, and itemised in
LICENSE_INVENTORY.md.