engine: evaluate one-column figure widths under the GOTEX_FLOATS faithful mode - #195
Merged
Merged
Conversation
…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>
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
In one-column mode a
\columnwidth/\textwidth/\linewidth-relative\includegraphicswidth was read raw, dropping the control sequence, sowidth=0.9\textwidthbecame0.9ptand 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 underGOTEX_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_FLOATSa one-column0.9\textwidthfigure 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