Help us shape the future of Go! Take the 2026 Go Developer Survey

gotex-abdiff

command
v0.245.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Command gotex-abdiff compares TWO REVISIONS OF THIS ENGINE over a fixed corpus of real papers, and says what a change did to pagination.

It is the complement of gotex-refdiff, which compares the engine against a real LaTeX engine (how faithful are we?). This asks the other question: did this change move anything, and toward the reference or away from it? That is the measurement every corpus-affecting commit needs, and doing it by hand produced the same three wrong answers often enough to be worth a tool:

  • a BASE THAT WAS NOT THE BASE. Building it by switching the working tree carries uncommitted changes across, so both arms hold the treatment and the table comes back clean. Here each side is built in a worktree of its own and the report prints the commit it resolved (build.go).
  • a PAGE COUNT THAT WAS A GREP. Counting "/Type /Page" in the raw bytes reads zero for a PDF with object streams and zero for a file that does not exist, so "334 pages", "no output" and "I cannot read this" all arrived as the same number. Here the PDF is parsed, and anything unreadable is an error the report counts and refuses to score (pages.go).
  • A REFERENCE READ BY KEY. The reference page counts are paired with the corpus list BY POSITION; read as a map they match nothing, and the result "0 exact, Σ 0" looks like a perfect score (corpus.go).

Example:

GOWORK=off go run ./cmd/gotex-abdiff \
  -list /path/clean-list.txt -refs /path/clean-refs.txt \
  -base origin/main -head HEAD -texmf /path/texmf

Jump to

Keyboard shortcuts

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