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

gotex-linediff

command
v0.247.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: 9 Imported by: 0

Documentation

Overview

Command gotex-linediff puts one page of two PDFs side by side, LINE BY LINE, with the geometry of each line: where it starts, where it ends, its baseline, the face and size it is set in, and — when it holds a leader — how many dots it draws and how far apart.

It exists because the whole-corpus instruments answer a different question. gotex-abdiff counts pages and gotex-refdiff scores a paper; neither can say "our contents entry starts 1.58pt to the right of the reference's and its dots are twice as dense", which is the sentence a fidelity defect is actually fixed from. Three such defects in the contents list were found and closed this way.

It reads the PDFs with github.com/go-pdfkit/reader: no qpdf, no poppler, no MuPDF, nothing but Go, so it runs wherever the engine's own tests run. Text comes through each font's ToUnicode CMap and widths through /Widths or /W; a font that carries neither yields runs with no text and no width rather than a made-up one.

gotex-linediff ref.pdf ours.pdf            # both, page 1, side by side
gotex-linediff -page 3 -above 300 a.pdf b.pdf
gotex-linediff ours.pdf                    # one file, just its lines

Jump to

Keyboard shortcuts

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