Repository navigation
render-pipeline tests: \item[<label>] geometry pinned against pdflatex — already 1:1 (#676, PR 2 of 2) - #705
Merged
Conversation
#676) What changed: - `tests/item_label_explicit_offset.rs` and its 10pt fixture: the explicit `\item[<label>]` label and body origins in itemize, enumerate and description, with a label that fits `\labelwidth` and one that does not, measured against /Library/TeX/texbin/pdflatex with PyMuPDF glyph origins. - Only the DEFAULT markers were pinned before (`itemize_label_offset.rs`). Issue #676 point 3 asks for the explicit label, which had no oracle at all. - The result is that the geometry half of #676 is already 1:1: `\makelabel` = `\hbox to\labelwidth{\hss #1}` right-aligns a short label and lets a wide one overhang left without moving the body, and `\descriptionlabel` flushes every label at the item's indent with the body after it on the same line. What was run: Ix label 144.8379 vs 144.8380 (d=-0.0001) body 158.6750 vs 158.6760 (d=-0.0010) IwideLabelHere label 85.7266 vs 85.7270 (d=-0.0004) body 158.6750 vs 158.7031 (d=-0.0281) Ex label 141.6553 vs 141.6550 (d=+0.0003) body 158.6750 vs 158.6811 (d=-0.0061) EwideLabelHere label 82.5440 vs 82.5440 (d=+0.0000) body 158.6750 vs 158.7081 (d=-0.0331) Dx label 133.7684 vs 133.7680 (d=+0.0004) body 153.5826 vs 153.5836 (d=-0.0010) DwideLabelHere label 133.7684 vs 133.7680 (d=+0.0004) body 222.3746 vs 222.3953 (d=-0.0207) test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s Next step: the remaining pipeline half of #676 — `ListGeom.label` carrying the label's inline content rather than a plain string, so styles and nested math are set and the clusters point at the bracket text. Implementation-Agent: claude-opus-5 subagent of daniel-parent Commit-Executor: daniel-parent subagent Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
This was referenced Sep 16, 2026
d-q222
added a commit
that referenced
this pull request
Sep 17, 2026
#784 All eight independently reviewed APPROVE. Batch verification: compiler 935/0, render-pipeline 487/0, perf-bench 14/0, perf gate OK (270 metrics, no regression), swift build --build-tests OK, CompletionTests 29/0. Commit-Executor: daniel-parent Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
ItsAkilesh
pushed a commit
to ItsAkilesh/flashtex
that referenced
this pull request
Sep 18, 2026
…ash-tex#706) What changed: `\end{<list>}` is `\@endparenv`'s `\addvspace\@topsepadd` and the `\begin{<list>}` beside it is `\@trivlist`'s `\addvspace\@topsep`. Both are `\addvspace`, so they keep the larger natural skip; the pipeline summed them. `\@endparenv` also leaves TeX in vertical mode, so the second `\begin` is read in vertical mode and takes `\partopsep` with no blank line in between; the pipeline read it as horizontal mode and dropped `\partopsep`. At 10pt that made a list/list boundary 10pt + 8pt = 18pt where pdflatex puts max(10pt, 10pt) = 10pt. Every list after the first sat 8pt low and the error grew 6pt at each further boundary (4 adjacent lists: +7.971, +13.948, +19.925 bp). The environment never mattered: `itemize`, `enumerate` and `description` are all `\list` with `\@listI`'s skips, and `list_seps_from` does not branch on the name for vertical spacing. flash-tex#706 saw only `itemize` match because `itemize` came first in its fixture. New `tests/adjacent_list_skips.rs` pins the adjacency coverage flash-tex#705's oracle left out: all six orderings of the three environments, all nine ordered pairs, four of a kind and a mixed chain of four, plus the `\topsep`-only vs `\topsep`+`\partopsep` pair that separates the two lengths. What was run: cargo test -p render-pipeline --test adjacent_list_skips test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out same test on unfixed origin/main (dbe3cac), to show it catches the bug: test result: FAILED. 1 passed; 3 failed; 0 ignored; 0 measured ied: bravo: 164.653 bp, pdflatex 156.682 bp (+7.970) 28-document pdflatex sweep (MacTeX 2026, PyMuPDF glyph origins), engine vs pdflatex: worst |dy| = 0.0001 bp, worst |dx| = 0.0379 bp, all within 0.5 bp. Next step: Full `cargo test -p render-pipeline` diffed against origin/main for regressions. Implementation-Agent: claude-opus-5 subagent of daniel-parent Commit-Executor: daniel-parent subagent Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
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
A pdflatex oracle for the explicit
\item[<label>]label — issue #676 point 3 — in all threelist environments at 10pt, with a label that fits
\labelwidthand one that does not.tests/itemize_label_offset.rspins the default markers (•,1.,(a), …). The explicitlabel, the one the owner reports as "not 1:1 all of the time", had no oracle at all. This adds
tests/item_label_explicit_offset.rsand its fixture.What it pins, in pdflatex's own terms:
\makelabel=\hbox to\labelwidth{\hss #1}inside
\llap. So a short label is right-aligned, ending\labelsepbefore the body edge(
Ixat 144.838), and an over-wide one overhangs to the left (IwideLabelHereat 85.727)without moving the body —
IAandIBshare an x.\descriptionlabel=\hspace\labelsep\normalfont\bfseries #1with\labelwidth\z@and\itemindent-\leftmargin. Both labels are left-flushed at the item'sindent (133.768 for the short one and the wide one) and the body follows on the same line
\labelsepafter the label ends — soDAandDBdeliberately do not share an x.Those three properties are asserted directly as well as through the coordinates, so a future
regression says which rule it broke rather than just which number moved.
Why
The finding is the point: the geometry half of #676 is already 1:1. The issue's gate is 0.5 bp
on the label x; the engine is within 0.0004 bp on every label and 0.034 bp on every body, in
every environment, short label and over-wide label alike. Nothing needed fixing — but nothing was
holding it either, and the explicit-label path is exactly what the rest of #676 is about to change
(
ListGeom.labelis due to start carrying inline content instead of a plain string). This is thepin that has to exist before that lands.
Coordinates read from
/Library/TeX/texbin/pdflatexon the fixture with PyMuPDF'sget_texttrace()glyph origins. Tolerance is the suite's usual 0.1 bp, which is already fivetimes tighter than the issue asks.
Overlap check
GH-676-ITEM-LABEL-TEXTRUN, daniel-parent. This is the second PR of that claim; the firstis compiler:
\item[<label>]is a text run — nested math, styles, no silent drops (#676, PR 1 of 2) #702 (compiler). The two share no file, so this one is not stacked — it applies tomainon its own.
gh pr list --search "item label": compiler: \labelitemi..\labelitemiv as the article default markers #422 (agent/daniel-muse-lead/list-labels) is compiler-side\labelitem<i>defaults and touches no render-pipeline test. render-pipeline: consume compiler list structure; description, verse, quote in lists (list gate 39/39) #152/render-pipeline: a verbatim body inside a list is a trivlist inside that list (14/17) #268 (kabir-claude) arepipeline list work but add no fixture or test under these names. Nothing else open touches
crates/render-pipeline/tests/fixtures/.Test results
Actual vs pdflatex, printed from the test run (label x, then body x):
HW1/HW2 through the exact route (
flashtex-cli):This PR adds only a test and a fixture, so no rendered byte can move.
Not done
ListGeom.labelisOption<(String, Span)>andtypeset::label_boxbuilds one word box from it, so a label isdrawn as flat text in one style with every cluster pointing at the
\itemtoken.\textbfin alabel is flattened, and once the vendor pins move past compiler:
\item[<label>]is a text run — nested math, styles, no silent drops (#676, PR 1 of 2) #702 a label's$…$would reach the pageas a text-font character rather than as math (
\item[$\alpha$]becomes amissing_glyphwarning for α in
lmroman10-regular). MakingListGeomcarry the label'sVec<Inline>, andlabel_boxbuild an hbox of styled pieces plus real math boxes, is the third PR — and its mathhalf cannot be tested until
crates/render-pipeline/vendor/compileris re-pinned past compiler:\item[<label>]is a text run — nested math, styles, no silent drops (#676, PR 1 of 2) #702, soit belongs behind the re-pin (re-pin readiness: pipeline compiles against the queued compiler/pdf/math-layout (runbook for the integration lane) #631).
the engine's enumerate and description baselines sit 7.97 pt below pdflatex's, while itemize
matches exactly — an inter-list vertical skip divergence, unrelated to label x. Each environment
is on its own page in this fixture, so it does not affect these numbers. Worth its own issue.
🤖 Generated with Claude Code
https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz