gotex-refdiff

command
v0.168.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: BSD-3-Clause Imports: 13 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL