Documentation
¶
Overview ¶
Command gotex-refdiff is a reference-diff corpus sampler: the highest-signal fidelity detector for gotex. Over a random SAMPLE of a directory of real arXiv papers it compiles each paper twice — once with a real LaTeX engine (tectonic, the ground truth) and once with gotex — extracts the text of both PDFs with pdftotext, and reports a per-paper word-recall ratio: the fraction of the reference's extractable content words that gotex reproduced. The report is ranked worst-first, so the papers where gotex loses the most REAL content against a ground-truth engine surface directly as fix targets.
It is a developer tool, not a CI gate: it needs network (tectonic downloads its package bundle on first use) and poppler's pdftotext. tectonic and pdftotext are taken from PATH when present, else from pkgx. Example:
GOWORK=off go run ./cmd/gotex-refdiff -corpus /path/to/arxiv/work -n 40
The recall ratio is robust to the three known-expected engine differences documented in scripts/fidelity.sh (page numbers, math rendered as vector paths, and the fi/fl ligature ToUnicode gap); see contentWords in analyze.go.