Repository navigation
render-pipeline: a description item that opens with a display sets its term flush too - #409
Merged
Merged
Conversation
…its term flush too #405 gave `description` its `\list` geometry — `\labelwidth\z@ \itemindent-\leftmargin`, the class `\leftmargin`, the separations and the bold `\descriptionlabel`. One path did not get it: when the item's body opens with a display (`\item[Term] \[...\]`), `\@item` holds the label in `\@labels` and `\everypar` sets it on a line of its own, and that line is built by `display_opener_block`, which still placed the term at `\leftmargin - \labelsep`. `list_geometry` already returns the innermost `\leftmargin` for exactly this; `display_opener_block` was discarding it (`let (hang, labelwidth, _)`). Measured against pdflatex (TeX Live 2025) on a two-item `description` whose first item opens with `\[ x + y = z \]`: the term was at x 91.925 against the reference's 72.000, dx **+19.925 bp** (= `\leftmargin` 24.907 − `\labelsep` 4.981) on all three of its words. After, all 58 words on the page are within 0.005 bp in x and y — the probe is exact, including the display's own position and the text hanging at `\leftmargin` below it. **No corpus movement, and that is the honest summary of its reach:** no fixture in `fixtures/real-world/` has a `description` item that opens with a display, so the 22-document corpus is unchanged to the last word (dx 85.74%, dy 75.93%, both 69.79%, 14054 aligned, page counts 21/22, all identical before and after). This is a probe-verified correctness fix, not a parity gain. Gates: `cargo test --release --no-fail-fast` on render-pipeline 268 passed / 0 failed / 2 ignored (one new `description_display` test), class-geometry 4/0, compiler 581/0/4; amsmath 59/59, tabular 106/106, HW1 and HW2 3 pages / 0 errors / 0 font-FAILURE diagnostics. Implementation-Agent: Claude Opus 5 (lane nixos-graphics-sectioning, linux-primary) Commit-Executor: Claude Opus 5 (direct git, observed Cursor usage limit)
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
#405 gave
descriptionits\listgeometry —\labelwidth\z@ \itemindent-\leftmargin, the class\leftmargin, the separations and the bold\descriptionlabel. One path did not get it. When the item's body opens with a display (\item[Term] \[...\]),\@itemholds the label in\@labelsand\everyparsets it on a line of its own; that line is built bydisplay_opener_block, which still placed the term at\leftmargin - \labelsep.list_geometryalready returns the innermost\leftmarginfor exactly this —display_opener_blockwas discarding it (let (hang, labelwidth, _)).This is the residual of my #396, which #405 otherwise superseded; #396 is closed in favour of this.
Oracle evidence
pdflatex TeX Live 2025, a two-item
descriptionwhose first item opens with\[ x + y = z \]:Axlong/termx+19.925 bp is exactly
\leftmargin(24.907) −\labelsep(4.981).Corpus: no movement, and that is the honest reach
No fixture in
fixtures/real-world/has adescriptionitem that opens with a display, so the 22-document corpus is unchanged to the last word:A probe-verified correctness fix, not a parity gain. Measured against current
main(fb79c646), which already carries #405 and #400.Files touched
crates/render-pipeline/src/typeset.rs(display_opener_block)crates/render-pipeline/tests/description_display.rs(new)No
crates/render-pipeline/vendor/*change; no compiler-side change; no vendor re-pin required.Gates
cargo test --release --no-fail-fastwithFLASHTEX_FONT_DIRS/FLASHTEX_TFM_DIRSset:crates/render-pipeline268 passed / 0 failed / 2 ignoredcrates/class-geometry4 passed / 0 failedcrates/compiler581 passed / 0 failed / 4 ignored🤖 Generated with Claude Code
https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu