Skip to content
Tech News
← Back to articles

ExactTex. A gradually-typed superset of LaTeX

read original more articles
Why This Matters

ExactTeX introduces a gradually-typed extension to LaTeX, enabling users to specify and verify document components before rendering the PDF. Its integration with web-based tools and local compilers enhances error detection and revision tracking, bridging gaps in traditional LaTeX workflows. This innovation promises to improve document accuracy and collaboration in the tech and academic communities.

Key Takeaways

Know whether your document is sound before you look at the PDF.

ExactTeX is LaTeX with gradual annotation: you name the object you want checked, and what you do not name stays ordinary LaTeX, transported byte for byte. Rename a .tex file to .xtex and it keeps working; from there you choose how much to annotate, and what you annotate is guaranteed.

You can use ExactTeX in the browser today at Vitela — an editor built on the compiler's WebAssembly build, with the same checks, diagnostics and navigation running locally in the page.

Status: the compiler works, and three doors open into it. xtex parses, checks, emits LaTeX, writes source maps and applies revisions; xtex-lsp gives an editor diagnostics, hover, completion and go-to-definition; and the WebAssembly build runs the same core in any host with no compile server. A parity suite holds the three doors to one answer. Every claim below is about what is built, and each number is reproducible with the command that produced it.

What it is for

Two things LaTeX cannot do today.

Errors in your own words. When something does not fit on the page, LaTeX says:

Overfull \hbox (12.3pt too wide) in paragraph at lines 45--47

ExactTeX says:

your table "results" runs 12.3pt past the right margin paper.xtex:212 — column 3 does not fit the width you declared

... continue reading