Skip to content

engine: evaluate one-column figure widths under the GOTEX_FLOATS faithful mode - #195

Merged
tannevaled merged 1 commit into
mainfrom
onecol-faithful-widths
Sep 3, 2026
Merged

tannevaled merged 1 commit into
mainfrom
onecol-faithful-widths

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

What

In one-column mode a \columnwidth/\textwidth/\linewidth-relative \includegraphics width was read raw, dropping the control sequence, so width=0.9\textwidth became 0.9pt and the figure fell back to its oversized natural raster size. That legacy read stays the default (the single-column class emulations were tuned against the collapse), but under GOTEX_FLOATS — where the reader has opted into real float placement and figure rasters — the width is now evaluated as a real TeX dimension, so a figure renders at its true \textwidth-relative width.

Verified on 2206.00339: its figures go from 1165px natural → 416px = \linewidth (correct). Flag off stays byte-for-byte identical, confirmed page-by-page against the parent build.

Honest scope — a rendering-correctness fix, not a convergence claim

The effect on figure-heavy page counts is mixed: 2201.04865 improves 19→21 toward tectonic 22; 2206.00339 moves 34→33 off a baseline that was exact only because the oversized figures happened to pad the height. The dominant residual is float-page whitespace, not figure width. The value here is that figures render at the width the source asked for — I'm explicitly not claiming a page-count win.

Test

Under GOTEX_FLOATS a one-column 0.9\textwidth figure reserves ≈0.9·textwidth; with the flag off it keeps the legacy sub-point size. Full suite, vet, gofmt green; rebased onto #194.

🤖 Generated with Claude Code

…hful mode

In one-column mode a \columnwidth/\textwidth/\linewidth-relative \includegraphics
width was read raw, dropping the control sequence, so width=0.9\textwidth became
0.9pt and the figure fell back to its oversized natural raster size. That legacy
read stays the DEFAULT — the single-column class emulations were tuned against the
collapse — but under GOTEX_FLOATS, where the reader has opted into real float
placement and figure rasters, the width is now evaluated as a real TeX dimension,
so a figure renders at its true \textwidth-relative width (verified: 2206.00339's
figures 1165px natural -> 416px = \linewidth). Flag off stays byte-for-byte
identical (confirmed page-by-page against the parent build).

This is a rendering-correctness fix, not a page-count convergence claim: the
effect on figure-heavy page counts is mixed (2201.04865 improves 19->21 toward
tectonic 22; 2206.00339 moves 34->33 off a baseline exact only because oversized
figures padded the height), because the dominant residual is float-page
whitespace, not figure width. The figures simply render at the width the source
asked for.

Test: under GOTEX_FLOATS a one-column 0.9\textwidth figure reserves ≈0.9·textwidth;
with the flag off it keeps the legacy sub-point size.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit d7c9c01 into main Sep 3, 2026
18 checks passed
@tannevaled
tannevaled deleted the onecol-faithful-widths branch September 3, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant