Command coverage
Command coverage
How much of TeX and LaTeX the engine knows,
counted command by command. It sits next to the page-fidelity score (Σ|page
deviation| against a reference engine) because the two answer different
questions: the score says how close a rendered document is, this page says how
many of the commands a document can call are handled at all, and how many of
those are held to the reference.
Measured on engine v0.307.0 (commit 6a8ec838, with go-tex/math v0.63.0),
on 2026-11-30, over a corpus of 21 956 papers; the usage weights below are
taken from the 154 papers of the fidelity list.
The states
The states are cumulative: every conformant command is also tested, every
tested command is also accepted, so each column counts the commands that reach
at least that state. absent = commands − accepted.
| State | Definition |
|---|---|
| accepted | A one-line probe, run in-process through the engine in strict mode, does not make the engine report the name as an undefined control sequence (tried in text mode, then inside $…$). The engine recognised the name; whether it then does the right thing is not asked. |
| tested | Accepted, and the name is written as a control sequence in a Go string literal of a Test function of the engine tree. |
| conformant | Tested, and the test function carries a gotex:reference <source> marker (its assertion is held to a value taken from the reference engine), or the name appears in a test .tex file with a .tectonic.* witness beside it (15 parity fixtures). Prose that says “tectonic” does not count. |
| absent | The probe reports the name as undefined. |
Caveats, all of them real:
- tested is an upper bound. The name is written as input, not proven executed: a test may define its own macro of that name, or never feed the string to the engine.
- conformant is low today, and it measures the marking as much as the
engine. At v0.307.0 only 41 test functions carry the
gotex:referencemarker, so most conformant commands come from the 15 parity fixtures. The figure will rise as engine tests are marked, without the engine changing. The marker is per function: it does not check that the assertion is about that very name. - accepted is a probe result, not a mention. A name that the engine tree merely writes down but the probe finds undefined is absent.
The scopes
- TeX primitives: the names of
tex.web(TeX82) and of the engine table of tectonic (e-TeX, pdfTeX and XeTeX additions), probed in a plain document. latex.ltxkernel: the names the LaTeX kernel defines, probed in anarticle.- Package user commands: the commands without
@in the name that the.styof each of the 20 most-loaded packages of the corpus defines itself, probed with that package loaded. The package scope now counts only the names a package defines itself: a name thelatex.ltxkernel already defines stays in the kernel scope, and the names of a file the package merely loads are not read.
Raw count
| Scope | Commands | Accepted | Tested | Conformant | Absent |
|---|---|---|---|---|---|
| TeX primitives | 500 | 289 | 219 | 28 | 211 |
latex.ltx kernel | 1952 | 819 | 506 | 43 | 1133 |
| Package user commands | 819 | 313 | 182 | 26 | 506 |
Weighted by corpus usage
A command weighs the number of papers that use it (as a control sequence, outside comments); in a package scope only the papers that load the package count. Each figure is the share of the scope’s total weight.
| Scope | Total weight | Accepted | Tested | Conformant | Absent |
|---|---|---|---|---|---|
| TeX primitives | 6876 | 91.7% | 83.0% | 16.7% | 8.3% |
latex.ltx kernel | 19368 | 93.5% | 73.7% | 14.8% | 6.5% |
| Package user commands | 4054 | 91.2% | 78.3% | 29.1% | 8.8% |
Reading: weighted by use, the engine already accepts about 93% of what the
corpus calls, yet fewer than half of the kernel’s names (819 of 1952) are
accepted, because most of the kernel is rarely or never used. Only 15% (kernel) to
29% (packages) of that use is held to a value from the reference engine.
Raising conformant is the lever, and it takes gotex:reference assertions, not
more probes. Per-package figures (for example hyperref, amsmath, natbib)
are in the tool’s JSON output.
Other limits of the instrument: package commands come from the single .sty
only (tikz contributes none); helper macros spelled without @ count as user
commands; a probe error naming a different undefined control sequence is
counted accepted and kept as a note; symbol-named primitives are never “tested”.
No probe timed out or panicked.
How it is re-measured
With measure coverage from the go-tex/measure harness, version v0.2.0,
which links the engine at the version in its go.mod and refuses a checkout that
is not at that pinned commit. It writes the tables above as Markdown and JSON,
with the engine commit recorded. The figures on this page are those of the run
named above and are not updated by the build.