Repository navigation
render-pipeline: explicit glue keeps the space factor (min-hrulefill 0.554 bp -> 0.004 bp) - #548
Merged
Conversation
…otfill, \quad)
What changed:
- items_from_inlines_styled no longer resets the space factor to 1000 after
an HFill/HSpace/TextGlue inline. TeX sets \spacefactor only for characters,
boxes appended in horizontal mode, rules and math (tex.web §1034-§1044);
glue, the leaders' closing \kern\z@ and \leavevmode's \unhbox of a void box
leave it alone. So `Name: \hrulefill{} Date:` keeps the colon's 2000 and
the blank after `{}` gets \fontdimen7.
- fixtures/divergence-probes/min-hrulefill: `Date:` 317.276 -> 317.830 bp
(pdflatex 317.830); max delta 0.554 -> 0.004 bp.
What was run:
- cargo test --release --test space_factor_after_glue: test result: ok. 1 passed; 0 failed (fails on origin/main: `Date:` at x 317.276 bp, pdflatex 317.830 bp (off by -0.554 bp))
- cargo test --release --no-fail-fast (whole render-pipeline crate): 80 test binaries, passed 376 failed 0 ignored 3
- tools/visual-oracle/rank.py, fixtures/divergence-probes: within 0.5 bp +1 word (min-hrulefill), no other probe changed
- tools/visual-oracle/rank.py, fixtures/real-world: within 0.5 bp 12277 -> 12277, no page changed
- variants against MacTeX pdflatex: `\dotfill{}` 0.282 -> 0.005 bp, `\quad{}` after `.` 2.217 -> 0.004 bp
Next step: `\hspace{<n>em}` is set at a 12 pt em in a 10 pt article
(+2 bp per em) and the blank after its argument is dropped; not fixed here.
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 15, 2026
GoKubar
added a commit
that referenced
this pull request
Sep 15, 2026
…uashed form #556 refines #547, which has since squash-merged onto main along with five other render-pipeline landings (#524, #536, #538, #543, #548). Exactly one line conflicted: ours .map(|(_, e, c, ic)| (*c, *ic && *e == p + 2, *e >= body.len())) main .map(|(_, e, c, _)| (*c, *e == p + 2, *e >= body.len())) The extra `*ic &&` is precisely this PR's change -- it gates the interval on the fourth field #547 ignores -- so the branch side is kept. Taking the branch wholesale would have been wrong here. Unlike a plain stacked rebase, main carries five other commits in this file; git merged those cleanly around this hunk, and only this one line needed a decision. Implementation-Agent: orchestrator-astra Commit-Executor: orchestrator-astra (direct; Cursor usage limit)
This was referenced Sep 15, 2026
GoKubar
added a commit
that referenced
this pull request
Sep 15, 2026
Resolutions: - typeset.rs: the streaming assembly keeps harvesting math_glyph_unmapped in the block loop; main's two new BoxRec variants (Leader, Underline) join its span finder. The exact-caret hunk keeps the derived-carets Cluster and adopts main's provenance_of. - display.rs: union — DocumentFeatures (this branch) plus main's diagnostic wire caps. - The \dotfill run from #548 is converted to the derived-caret pattern (end_caret on the run), wire-identical through carets_of. - perf-bench: main's post-#206 canon (recalibrated baseline, product assemble signature); the lib/memprofile targets stay. - main's new tests/examples that read the removed Page.items field now use resident_items(); V1 payload accesses are untouched. Implementation-Agent: fable-ft070 Commit-Executor: fable-ft070 (direct; Cursor usage limit)
GoKubar
deleted the
agent/daniel-parent/probes-fidelity-space-factor
branch
September 16, 2026 04:17
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
Explicit glue no longer resets the space factor.
items_from_inlines_styledused to set the factor to 1000 after everyHFill,HSpaceandTextGlueinline. It now leaves the factor as the last character set it.Why
TeX sets
\spacefactoronly when it appends a character, a box in horizontal mode, a rule or math (tex.web §1034-§1044). None of these touch it:\hfill,\quad(\hskip1em\relax) and the\leadersof\hrulefilland\dotfill;\kern\z@;\leavevmode's\unhboxof a void box.So in
Name: \hrulefill{} Date:, the blank after{}still follows the colon's 2000 and gets\fontdimen7. That is 1.11111 pt inecrm1000. The two fills share the leftover width, soDate:sat half of that too far left.fixtures/divergence-probes/min-hrulefill:Date:moves 317.276 -> 317.830 bp (pdflatex 317.830). Max delta 0.554 -> 0.004 bp.Name: \dotfill{} Date: \dotfill: 0.282 -> 0.005 bp.Name:\quad{} Date. \quad{} x: 2.217 -> 0.004 bp.Overlap check
gh pr list --state open --searchfor "hrulefill", "dotfill", "space factor", "spacefactor", "leaders" and "hspace". render-pipeline: \dotfill dots follow the current inline font style and size #493 (d-q222 muse lane,\dotfillstyle) edits the sameHFillarm to add a style field. Its change is independent, but a small textual conflict next tofactor = 1000is possible. render-pipeline: thebibliography list layout and citation spacing (bibliography oracle 20/21 after re-pin) #167, render-pipeline: microtype's verbatim patch, and \frenchspacing inside \verb (15/17) #271 and compiler: the tie is a space, not a tilde #332 mention space factor for other constructs (citations,\frenchspacingin\verb, ties).coord.py claims: GH-PROBES-FIDELITY is held by daniel-parent. No claim covers glue or the space factor.Test results
The test pins the x values pdfLaTeX gives (MacTeX pdfTeX 1.40.29, read with
tools/visual-oracle/pdftext.py) for the probe, the\dotfillform and the\quadform. The committed TeX Live 2025 reference agrees at 317.830.Measured with
tools/visual-oracle/rank.py:fixtures/divergence-probes: 1 more word within 0.5 bp (min-hrulefill). No other probe changed.fixtures/real-world: no page changed.Not done
\hspace{<n>em}in a 10 pt article is set at a 12 pt em: +1.99 bp per em (Name\hspace{1em}Date\hspace{2em}xis 5.989 bp off). The blank after\hspace{..}'s argument is also dropped. The em conversion is incrates/compiler(parser.rs"hspace"), so the fix needs a compiler PR and a re-pin. Not attempted here.🤖 Generated with Claude Code
https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz