ExactTeX: A gradually-typed superset of LaTeX that catches errors before the PDF exists

ExactTex. A gradually-typed superset of LaTeX

ExactTeX is a gradually-typed superset of LaTeX that lets you annotate your documents to catch errors before compilation. Every .tex file is valid .xtex, and annotations buy checked references, safe renames, and precise diagnostics. The compiler, LSP, and WebAssembly build share a zero-dependency core, with a coverage meter showing how much of your document is under contract. It's not a replacement for LaTeX—your journal still gets a .tex file—but it brings type safety to document writing.

The parts that transport your document are careful; the parts that let people argue about it are new.
  1. cvanelteren

    I hope tex gets replaced by typst. It much more pleasurable to write in in my opinion.

  2. yiyu_earth

    I do not believe that writing native LaTeX code is difficult today, given the popularity of AI-assisted coding. In comparison, using a "compiler that outputs LaTeX code" may be less stable.

  3. podocarp

    The problem with latex is definitely not types, not unless you're maintaining hundred line macros and defs. I think one problem is just that it's hard to represent 2d stuff in 1d. Like let's not even talk about equations, what about drawing tikz? It's like writing regex, I don't want to touch it again after I'm done.

    Sometimes I rather just draw in inkscape and embed the PDF.

    Also, taste. It's still kind of a wild west so you see people using the italics d for derivatives instead of the differential operator upright bold form. I guess because it's hard to type those out compared to "d". There's probably a lot more, but this is the most common. Some common whiteboard things that are just not obvious when typing in latex.

    In any case it's good enough for what it is and with AI it will probably improve further, maybe I will just get it to fix all italics "d"s in the future so poor typesetting just gets fixed in post. That will probably enrage some people though :)

More from this day

2026-09-05