Skip to content

compiler: vertical \pagebreak is a bare penalty, amsmath \nobreakdash (#64; stacked on #568) - #583

Merged
GoKubar merged 12 commits into
mainfrom
agent/daniel-parent/page-control-followups-compiler
Sep 15, 2026
Merged

GoKubar merged 12 commits into
mainfrom
agent/daniel-parent/page-control-followups-compiler

Conversation

@d-q222

@d-q222 d-q222 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

What

Compiler follow-ups to #568 for issue #64 (stacked on #568: review the two commits after 588637cc).

  • Vertical \pagebreak (priority 4) is now Block::Penalty { value: -10000 }, not Block::PageBreak. latex.ltx's \pagebreak is a bare \penalty-\@M; \newpage is \vfil\penalty-\@M. The render pipeline needs the difference for \flushbottom. \newpage/\clearpage still give Block::PageBreak, and the Core 14 layout already breaks at a vertical penalty of -10000 or below.
  • amsmath \nobreakdash: the following -, -- or --- become text, then Inline::Penalty 10000. This follows amsmath's \setboxz@h{--\nobreak}\unhbox\z@. Supported-LaTeX artefacts were regenerated with render_supported_latex.sh.
  • \include's \clearpage pair was in the first commit and is reverted in the second. render-pipeline: floats numbered in \include reading order, LoF/LoT and \ref agree (stacked on #537 and #538) #578 owns it (coordinator decision), so this PR has no net change to expansion.rs or tests/includeonly.rs.

Why

pdflatex (TeX Live 2026, article, \pagestyle{empty}):

  • \flushbottom, 30 one-line paragraphs, then \pagebreak: page 1's last baseline is at y 675 (the page is stretched, Underfull \vbox). After \newpage it is at 484. FlashTeX with compiler: page and paragraph control commands as penalty, discretionary and parameter nodes (#64) #568 could not tell the two apart.
  • pages 113--213 in a justified paragraph: line 3 of the control ends 113–. With 113\nobreakdash--213, no line ends with a dash. Before this PR, FlashTeX reported \nobreakdash as unknown_command (error) and the break stayed legal.

Overlap check

Test results

cargo test --lib: test result: ok. 349 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
cargo test --test includeonly: test result: ok. 9 passed; 0 failed
cargo test --test supported_latex: test result: ok. 8 passed; 0 failed
cargo test --no-fail-fast (whole crate, first commit): every target ok after regenerating the artefacts

New tests:

  • vertical_pagebreak_is_a_bare_penalty_newpage_is_not
  • nobreakdash_sets_its_dashes_and_then_nobreak

Neither compiles to a passing test on #568: it has no \nobreakdash (unknown command diagnostic) and reports Block::PageBreak for \pagebreak. Rendered results are in the companion draft pipeline PR, built in a scratch export with vendor/compiler replaced by this branch.

Not done

🤖 Generated with Claude Code

https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

…ry and parameter nodes (#64)

What changed:
- New AST: Inline::Penalty {value, unskip} (\penalty, \nobreak, \allowbreak,
  \linebreak[n], \nolinebreak[n]), Inline::PagePenalty (\pagebreak[n] and
  \nopagebreak[n] inside a paragraph: \vadjust, the paragraph is not broken),
  Inline::Discretionary (\-, \discretionary{}{}{}), Block::Penalty {value, fil}
  (vertical-mode \penalty/\nobreak, \pagebreak[n<4], \nopagebreak[n],
  \goodbreak, \filbreak). Values are latex.ltx's \@getpen 0/51/151/301/10000.
- Parsed::parameters: \tolerance, \pretolerance, \looseness, \widowpenalty,
  \clubpenalty, \interlinepenalty, \emergencystretch (also \setlength),
  \sloppy, \fussy, sloppypar, \samepage (and its environment), \raggedbottom,
  \flushbottom, \enlargethispage(*), each with the group end that restores it.
  Parsed::hyphenation: \hyphenation words.
- \- is a command in the lexer and the expansion pass, so it is never typeset
  as a hyphen; \penalty's number and parameter values no longer leak as text.
- Core 14 layout: forced penalties break lines/pages; \pagebreak in a paragraph
  ends the page after its line (FlowState carries the pending eject).
- Inventory, vocabulary and generated supported-LaTeX artefacts regenerated.

What was run:
- cargo test (crates/compiler): 573 passed; 0 failed before the inventory move,
  then --lib: test result: ok. 347 passed; 0 failed
- --test supported_latex: test result: ok. 8 passed; 0 failed
- --test hw1_preamble/hw2_gate/corpus_gate/pinned_fixtures/incremental_json_identity/
  local_recovery/preamble_page_commands/line_break_skip: all ok
- pdflatex \showlists / \showthe oracle for every value (in the PR body).

Next step: render-pipeline consumes the nodes after vendor/compiler is re-pinned.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
#64)

What changed:
- Inline::Penalty/PagePenalty spans now include `[n]` and `\penalty`'s number,
  so a consumer reading the source after a node starts past them (the
  pipeline decides whether LaTeX ate the blanks after the command from this).

What was run:
- cargo test --lib (crates/compiler): test result: ok. 347 passed; 0 failed

Next step: open the compiler PR and the render-pipeline draft.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
…alty, \nobreakdash (#64)

What changed:
- \include{file} emits latex.ltx \@include's \clearpage before the file and
  after it (expansion.rs: the closing one precedes the first token read once
  the engine has left the file). A file \includeonly skips keeps only the
  first; a missing file keeps both. \input is unchanged.
- A vertical-mode \pagebreak (priority 4) is Block::Penalty { value: -10000 }
  instead of Block::PageBreak: latex.ltx has no \vfil before it, unlike
  \newpage, so a \flushbottom page it ends is stretched.
- amsmath \nobreakdash: the following -, -- or --- as text, then
  Inline::Penalty 10000 (\setboxz@h{--\nobreak}\unhbox\z@). Supported-LaTeX
  artefacts regenerated.

What was run:
- cargo test --lib: test result: ok. 349 passed; 0 failed
- cargo test --no-fail-fast (whole crate): every target ok after
  render_supported_latex.sh (supported_latex: ok. 8 passed; includeonly: ok. 10 passed)
- pdflatex probes with the render pipeline (scratch export): include 3/3 pages,
  include-para, include-two 4, include-last 2, includeonly-excluded 2: all match.

Next step: render-pipeline draft consumes the bare penalty (flushbottom) and
\nobreakdash's hyphenation; vendor re-pin past #568 and this PR.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
What changed:
- Reverted the \include \clearpage emission in expansion.rs and the
  includeonly test changes from the previous commit: #578 (render pipeline,
  agent/daniel-parent/include-float-numbering) already clears the page before
  and after an \include'd file, and the coordinator moved that item there.
  The vertical \pagebreak penalty and \nobreakdash stay.

What was run:
- cargo test --lib: test result: ok. 349 passed; 0 failed
- cargo test --test includeonly: test result: ok. 9 passed; 0 failed
- cargo test --test supported_latex: test result: ok. 8 passed; 0 failed

Next step: render-pipeline draft for \pagebreak under \flushbottom,
\nobreakdash hyphenation, \enlargethispage and the \clearpage float flush.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
@d-q222

d-q222 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

daniel-parent independent review (subagent)

Verdict: APPROVE

What was run

  • Ground truth sources located: kpsewhich latex.ltx amsmath.sty amsmath.dtx → /usr/local/texlive/2026/texmf-dist/tex/latex/base/latex.ltx, .../amsmath/amsmath.sty, .../source/latex/amsmath/amsmath.dtx. kpsewhich nobreakdash.sty → not installed (exit 1) — confirmed the PR targets amsmath's \nobreakdash, not the older standalone package.
  • Read kernel macros directly: \pagebreak/\nopagebreak/\@no@pgbk/\@getpen (latex.ltx L9214-9270), \newpage (L20438-20452), \nobreak (L606); \@lowpenalty/\@medpenalty/\@highpenalty numeric values from classes.dtx L118-120 (only place they're actually assigned — they're \newcounts in latex.ltx itself); amsmath \nobreakdash (amsmath.sty L403-408).
  • Empirical oracle, /Library/TeX/texbin/pdflatex -interaction=nonstopmode -halt-on-error, TeX Live 2026:
    • \flushbottom + 30 one-line paragraphs + bare \pagebreak → "Underfull \vbox (badness 10000)". Same doc with \newpage instead → no warning. Confirms \pagebreak (no \vfil) stretches a flushbottom page; \newpage (has \vfil) doesn't.
    • \textwidth=2.3cm, pages 113\nobreakdash--213 end. → one "Overfull \hbox (16.28098pt too wide)" line covering the whole sentence — pdflatex refused every potential break point including right after the dash, confirming \nobreakdash suppresses the break there.
    • (A \tracingpages=1 pass was also run but outer-vertical-mode \lastpenalty reads back 0 after every \pagebreak/\nopagebreak — the page builder whisks the penalty off the contribution list before it can be read back this way; the two behavioral probes above are the reliable oracle and are what's cited below.)
  • git log --oneline origin/main..HEAD -- crates/compiler (in ~/flashtex-wt/review-583): 4 commits — 1f3b323b/588637cc are compiler: page and paragraph control commands as penalty, discretionary and parameter nodes (#64) #568's (still open, unchanged by compiler: vertical \pagebreak is a bare penalty, amsmath \nobreakdash (#64; stacked on #568) #583), fb1af419/8dfc8f8a are compiler: vertical \pagebreak is a bare penalty, amsmath \nobreakdash (#64; stacked on #568) #583's own.
  • cargo test -p flashtex-compiler --lib -- pagebreak nobreakdash enlargethispage: 6 passed, 0 failed.
  • cargo test -p flashtex-compiler --lib (full suite): 349 passed, 0 failed — matches both commits' stated "349 passed; 0 failed".
  • cargo test -p flashtex-compiler --test supported_latex: 8 passed, 0 failed. --test includeonly: 9 passed, 0 failed — matches 8dfc8f8a's stated counts.

(Crate name is flashtex-compiler; no root Cargo.toml — ran from crates/compiler.)

Findings

  1. Bare \pagebreak penalty value — input: \DeclareRobustCommand\pagebreak{\@testopt{\@no@pgbk-}4} + \@getpen (latex.ltx L9214-9270) + \@lowpenalty=51 \@medpenalty=151 \@highpenalty=301 (classes.dtx L118-120) → kernel: priority defaults to 4 → \@getpen{4}'s \else branch → \@M=10000, negated → -10000 → actual: parser.rs break_priority_penalty() defaults unbracketed priority to 4, maps _ => INF_PENALTY (10000), "pagebreak" arm negates it → Block::Penalty{value:-10000}. Match.

  2. \pagebreak[N]/\nopagebreak[N] full priority table (N=0..3) — input: \ifcase#1 \z@ \or\@lowpenalty\or\@medpenalty\or\@highpenalty\else\@M\fi with 51/151/301 → actual: break_priority_penalty match arms 0=>0, 1=>51, 2=>151, 3=>301, _=>INF_PENALTY, sign applied by pagebreak vs nopagebreak. Exact match, including the \ifcase's \else catch-all for anything outside 0-3 (compiler also defaults unparseable brackets to priority 4/10000, a reasonable superset of the kernel's undefined-\ifcase case).

  3. Bare \pagebreak has no \vfil, unlike \newpage — input: \newpage = \par\vfil\penalty-\@M (latex.ltx L20438-20452, has \vfil) vs \pagebreak = plain \penalty-\@M (no \vfil) → also confirmed empirically (Underfull-vbox test above) → actual: PR changes the empty-paragraph, priority-4 case from Block::PageBreak (this codebase's unconditional/cushioned break, shared with \newpage/\clearpage) to Block::Penalty{value:-10000, fil:false}, and the compiler's own pages() test helper still treats it as forcing exactly one break (pagebreak_at_default_or_explicit_priority_four_forces_a_fresh_page, passing) — so the break still happens, only the \vfil-cushioning is (correctly) no longer implied, leaving the flushbottom-stretch distinction for the render-pipeline (render-pipeline: \enlargethispage, \clearpage float flush, \flushbottom after \pagebreak, \nobreakdash (#64; stacked on #569, needs #568+#583 re-pin) #584) to act on. Match, and a real, non-obvious bug fix.

  4. amsmath \nobreakdash — input: amsmath.sty L403-408 \newcommand{\nobreakdash}{\leavevmode ... \setboxz@h{\the\toks@\nobreak}\unhbox\z@}, \nobreak=\penalty\@M=10000 (latex.ltx L606) → also confirmed empirically (Overfull-hbox test above: no break taken anywhere in a hugely-overfull line) → actual: new "nobreakdash" arm in parser.rs counts the immediately-following leading dashes, emits Inline::Text for the ligated dash(es) (via the existing apply_text_ligatures, so -/--/--- still become hyphen/en-dash/em-dash exactly as a real font ligature inside amsmath's \hbox would), then Inline::Penalty{value: INF_PENALTY}. Match. Correctly targets amsmath's version, not the older standalone nobreakdash.sty (not installed on this machine, and the PR's own comments cite amsmath.sty's macro body verbatim).

  5. Stacking on compiler: page and paragraph control commands as penalty, discretionary and parameter nodes (#64) #568 — input: git log shows compiler: vertical \pagebreak is a bare penalty, amsmath \nobreakdash (#64; stacked on #568) #583's real new work is only fb1af419+8dfc8f8a; diffing 588637cc..8dfc8f8a touches only parser.rs (+110/-14) and generated docs/coverage — none of lexer.rs/incremental.rs/layout.rs/tabular.rs/expansion.rs/vocabulary.rs (listed among compiler: vertical \pagebreak is a bare penalty, amsmath \nobreakdash (#64; stacked on #568) #583's "changed files" in the review request) are touched again on top of compiler: page and paragraph control commands as penalty, discretionary and parameter nodes (#64) #568; they're entirely inherited from compiler: page and paragraph control commands as penalty, discretionary and parameter nodes (#64) #568's base commits 1f3b323b/588637cc. Likewise \enlargethispage parsing is entirely compiler: page and paragraph control commands as penalty, discretionary and parameter nodes (#64) #568's (1f3b323b), not new in compiler: vertical \pagebreak is a bare penalty, amsmath \nobreakdash (#64; stacked on #568) #583. → actual: compiler: vertical \pagebreak is a bare penalty, amsmath \nobreakdash (#64; stacked on #568) #583 reuses Block::Penalty/Inline::Penalty/Inline::PagePenalty exactly as compiler: page and paragraph control commands as penalty, discretionary and parameter nodes (#64) #568 defined them with no reinvented types or duplicated logic. No defect — flagging only so the PR's effective diff is understood correctly (it's much narrower than the full branch-vs-main diff, since compiler: page and paragraph control commands as penalty, discretionary and parameter nodes (#64) #568 hasn't merged).

  6. Test coverage — input: inline #[cfg(test)] mod tests in parser.rs (this crate's convention, confirmed) → 6 targeted tests added/exercised (vertical_pagebreak_is_a_bare_penalty_newpage_is_not, nobreakdash_sets_its_dashes_and_then_nobreak, pagebreak_below_priority_four_is_a_no_op_hint, nopagebreak_is_accepted_without_a_diagnostic_and_has_no_visible_effect, pagebreak_at_default_or_explicit_priority_four_forces_a_fresh_page, pagebreak_inside_a_paragraph_ends_the_page_after_its_line_not_the_paragraph) all pass; full lib suite 349/349; supported_latex/includeonly integration suites both green. Coverage is present and directly cites the pdflatex behavior it's pinning (each test's doc-comment gives the real pdflatex observation). No gap found.

  7. Minor, non-blocking note: \pagebreak[0..3] in an empty paragraph is explicitly a no-op at this compiler's layout stage (pagebreak_below_priority_four_is_a_no_op_hint, doc comment: "a priority below 4 is only a hint this compiler has no badness model to honour") — a known, tested, and reasonable scope limit rather than a defect, since real badness-graded page breaking is deferred to the render-pipeline crate. Just flagging for the reviewer's awareness, not a change request.

No mismatches between the diff and the kernel/amsmath ground truth were found on any checked constant or behavior.

d-q222 added a commit that referenced this pull request Sep 15, 2026
…s page

What changed:
The adapter lays an \include'd file's structural commands (\chapter, ...)
out before that file's next unit (paragraph, heading, rule, picture). A
file whose whole body is a captioned float has no unit, so its \chapter
(heading, page clear, number) was never laid out and the floats piled onto
one page ahead of later text. Likewise a trailing entry \chapter with only a
float after it was dropped: the end-of-document loop handled only marks,
page styles and \maketitle.
- An entry \input/\include consumed without a unit of the file it reads
  (found from the reading order) lays that file's commands out in place,
  then \include's closing \clearpage.
- A unit of an included file flushes up to the command that reads its
  file, not merely the next \input/\include.
- Included files read so far are finished whenever the next file is read,
  not only when the entry file resumes.
- The unit loop takes one last pass after the last unit, so commands after
  it (\chapter, \include, marks, \maketitle) go through the same code; the
  separate trailing loop is gone.
tests/include_float_only_chapters.rs pins pages, lines and baselines
against pdflatex for two and three float-only \include'd chapters, the same
under \includeonly (with and without trailing text), and single-file
float-only chapters.

What was run:
cargo test --release --test include_float_only_chapters
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
same test without the adapter change: test result: FAILED. 0 passed; 3 failed
chapter_in_included_file: test result: ok. 2 passed; 0 failed
float_body_oracle: test result: ok. 1 passed; 0 failed
float_graphics_oracle: test result: ok. 1 passed; 0 failed
float_notes_oracle: test result: ok. 1 passed; 0 failed
float_numbering_oracle: test result: ok. 1 passed; 0 failed
floats_oracle: test result: ok. 3 passed; 0 failed
include_float_lists: test result: ok. 1 passed; 0 failed
input_order_oracle: test result: ok. 1 passed; 0 failed
toc_oracle: test result: ok. 1 passed; 0 failed
cargo test --release -p flashtex-render-pipeline --no-fail-fast: passed 386, failed 0, ignored 3

Next step: a float right after a body \clearpage (no \include) still lands
on the old page; that break is carried by the next block's eject and is
left to the #569/#583/#584 page-break stack.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
d-q222 added a commit that referenced this pull request Sep 15, 2026
…agraph

What changed:
- floats::mask leaves an unstarred `[H]` float's line blank: `\float@endH`
  ends the paragraph with `\par`, so pdflatex splits `First.\n<[H]>\nSecond.`
  (probe: `Second.` starts an indented paragraph below the box).

What was run:
cargo test --release --lib floats::: test result: ok. 5 passed; 0 failed
cargo test --release --no-fail-fast (render-pipeline): 380 passed; 0 failed; 3 ignored
#599 export + #583 compiler, --features linebreak-skip, page_para_control: test result: ok. 19 passed; 0 failed

Next step: open the PR.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
Kept both sides of the supported.rs inventory (main's \xspace entry plus this
branch's penalty-based page/paragraph-control entries) and regenerated
docs/user/compiler.md, supported-latex.json, coverage.md and the Mac bundled
copy via render_supported_latex.sh.

Implementation-Agent: fable-rebase-c
Commit-Executor: fable-rebase-c (direct; Cursor usage limit)
…followups

Brings in origin/main via the parent PR #568 branch's merge commit; regenerated
docs/user/compiler.md and the supported-latex inventories.

Implementation-Agent: fable-rebase-c
Commit-Executor: fable-rebase-c (direct; Cursor usage limit)
Kept main's \fnsymbol dispatch arm alongside this stack's penalty-based
\linebreak/\nolinebreak arms in parser.rs; regenerated docs/user/compiler.md
and the supported-latex inventories.

Implementation-Agent: fable-rebase-c
Commit-Executor: fable-rebase-c (direct; Cursor usage limit)
Kept main's \fnsymbol dispatch arm alongside this branch's penalty-based
\linebreak/\nolinebreak arms; regenerated the supported-latex artefacts.

Implementation-Agent: fable-rebase-c
Commit-Executor: fable-rebase-c (direct; Cursor usage limit)
…wups

Records the parent PR #568 branch's own origin/main merge; no tree changes.

Implementation-Agent: fable-rebase-c
Commit-Executor: fable-rebase-c (direct; Cursor usage limit)
Parent #568 is squashed on main; kept this branch's own changes (nobreakdash,
bare-penalty vertical \pagebreak, doc comments) over the squash and main's
#610 parser changes. Regenerated the supported-latex artefacts.

Implementation-Agent: fable-rebase-c
Commit-Executor: fable-rebase-c (direct; Cursor usage limit)
Clean merge (#606 rubber lengths, #576 kern spans, #499, #624); no conflicts.

Implementation-Agent: fable-rebase-c
Commit-Executor: fable-rebase-c (direct; Cursor usage limit)
…fields

The #568 squash and this branch both carried
pagebreak_inside_a_paragraph_ends_the_page_after_its_line_not_the_paragraph
(byte-identical); kept one. kernel_untested_b.rs's Block::VSpace pattern now
ignores #606's stretch_pt/shrink_pt (it asserts only pt) - note main's tip has
the same flat pattern and needs the same fix.

Implementation-Agent: fable-rebase-c
Commit-Executor: fable-rebase-c (direct; Cursor usage limit)
@GoKubar
GoKubar merged commit b4d7422 into main Sep 15, 2026
10 of 21 checks passed
GoKubar added a commit that referenced this pull request Sep 15, 2026
Parents #568/#583 are squashed on main; kept this branch's own mode-based
horizontal-\pagebreak logic, comment and test over the squash state, and took
main's #587 parser state fields (length_scopes, pending_global,
latin_modern, preamble_latin_modern). Regenerated supported-latex artefacts.

Implementation-Agent: fable-rebase-c
Commit-Executor: fable-rebase-c (direct; Cursor usage limit)
GoKubar added a commit that referenced this pull request Sep 15, 2026
…rew the inventory

docs/user/compiler.md (generated) conflicted again; took main's copy and
regenerated via render_supported_latex.sh, sync --check clean. Main's #636
VSpace-pattern fix matches the one this branch already carried.

Implementation-Agent: fable-rebase-a
Commit-Executor: fable-rebase-a (direct; Cursor usage limit)
GoKubar added a commit that referenced this pull request Sep 15, 2026
 grew the inventory

Generated artefacts conflicted again (docs/user/compiler.md,
supported/supported-latex.json, coverage.md, Mac bundled copy); took
main's copies and regenerated via render_supported_latex.sh so the math
accents and main's additions both appear, sync --check clean.

Implementation-Agent: fable-rebase-a
Commit-Executor: fable-rebase-a (direct; Cursor usage limit)
GoKubar added a commit that referenced this pull request Sep 15, 2026
…rizontal (GH-PAGEBREAK-MIDPARAGRAPH; stacked on #583) (#616)

* compiler: page and paragraph control commands as penalty, discretionary and parameter nodes (#64)

What changed:
- New AST: Inline::Penalty {value, unskip} (\penalty, \nobreak, \allowbreak,
  \linebreak[n], \nolinebreak[n]), Inline::PagePenalty (\pagebreak[n] and
  \nopagebreak[n] inside a paragraph: \vadjust, the paragraph is not broken),
  Inline::Discretionary (\-, \discretionary{}{}{}), Block::Penalty {value, fil}
  (vertical-mode \penalty/\nobreak, \pagebreak[n<4], \nopagebreak[n],
  \goodbreak, \filbreak). Values are latex.ltx's \@getpen 0/51/151/301/10000.
- Parsed::parameters: \tolerance, \pretolerance, \looseness, \widowpenalty,
  \clubpenalty, \interlinepenalty, \emergencystretch (also \setlength),
  \sloppy, \fussy, sloppypar, \samepage (and its environment), \raggedbottom,
  \flushbottom, \enlargethispage(*), each with the group end that restores it.
  Parsed::hyphenation: \hyphenation words.
- \- is a command in the lexer and the expansion pass, so it is never typeset
  as a hyphen; \penalty's number and parameter values no longer leak as text.
- Core 14 layout: forced penalties break lines/pages; \pagebreak in a paragraph
  ends the page after its line (FlowState carries the pending eject).
- Inventory, vocabulary and generated supported-LaTeX artefacts regenerated.

What was run:
- cargo test (crates/compiler): 573 passed; 0 failed before the inventory move,
  then --lib: test result: ok. 347 passed; 0 failed
- --test supported_latex: test result: ok. 8 passed; 0 failed
- --test hw1_preamble/hw2_gate/corpus_gate/pinned_fixtures/incremental_json_identity/
  local_recovery/preamble_page_commands/line_break_skip: all ok
- pdflatex \showlists / \showthe oracle for every value (in the PR body).

Next step: render-pipeline consumes the nodes after vendor/compiler is re-pinned.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* compiler: penalty nodes' spans cover their number and priority bracket (#64)

What changed:
- Inline::Penalty/PagePenalty spans now include `[n]` and `\penalty`'s number,
  so a consumer reading the source after a node starts past them (the
  pipeline decides whether LaTeX ate the blanks after the command from this).

What was run:
- cargo test --lib (crates/compiler): test result: ok. 347 passed; 0 failed

Next step: open the compiler PR and the render-pipeline draft.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* compiler: \include clears the page, vertical \pagebreak is a bare penalty, \nobreakdash (#64)

What changed:
- \include{file} emits latex.ltx \@include's \clearpage before the file and
  after it (expansion.rs: the closing one precedes the first token read once
  the engine has left the file). A file \includeonly skips keeps only the
  first; a missing file keeps both. \input is unchanged.
- A vertical-mode \pagebreak (priority 4) is Block::Penalty { value: -10000 }
  instead of Block::PageBreak: latex.ltx has no \vfil before it, unlike
  \newpage, so a \flushbottom page it ends is stretched.
- amsmath \nobreakdash: the following -, -- or --- as text, then
  Inline::Penalty 10000 (\setboxz@h{--\nobreak}\unhbox\z@). Supported-LaTeX
  artefacts regenerated.

What was run:
- cargo test --lib: test result: ok. 349 passed; 0 failed
- cargo test --no-fail-fast (whole crate): every target ok after
  render_supported_latex.sh (supported_latex: ok. 8 passed; includeonly: ok. 10 passed)
- pdflatex probes with the render pipeline (scratch export): include 3/3 pages,
  include-para, include-two 4, include-last 2, includeonly-excluded 2: all match.

Next step: render-pipeline draft consumes the bare penalty (flushbottom) and
\nobreakdash's hyphenation; vendor re-pin past #568 and this PR.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* compiler: leave \include's page breaks to #578 (#64)

What changed:
- Reverted the \include \clearpage emission in expansion.rs and the
  includeonly test changes from the previous commit: #578 (render pipeline,
  agent/daniel-parent/include-float-numbering) already clears the page before
  and after an \include'd file, and the coordinator moved that item there.
  The vertical \pagebreak penalty and \nobreakdash stay.

What was run:
- cargo test --lib: test result: ok. 349 passed; 0 failed
- cargo test --test includeonly: test result: ok. 9 passed; 0 failed
- cargo test --test supported_latex: test result: ok. 8 passed; 0 failed

Next step: render-pipeline draft for \pagebreak under \flushbottom,
\nobreakdash hyphenation, \enlargethispage and the \clearpage float flush.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* compiler: \pagebreak right after \noindent, \indent or \textbf{ is horizontal (GH-PAGEBREAK-MIDPARAGRAPH)

What changed:
- The `\pagebreak`/`\nopagebreak` arm decided the mode from whether the
  paragraph had collected any inline. `\noindent`, `\indent` and the text
  font commands (`\hmode@bgroup` = `\leavevmode\bgroup`) start the
  paragraph without adding one, so `\noindent\pagebreak text` was a
  vertical penalty before the paragraph (on an empty page it was dropped
  entirely). A new parser flag `paragraph_started` is set by those
  commands and cleared when a block is pushed or the paragraph is flushed;
  with it set the command is `Inline::PagePenalty` (latex.ltx `\@no@pgbk`'s
  `\vadjust`).
- A paragraph holding only `\label`s is still vertical:
  `\label{a}\pagebreak text` is a `Block::Penalty` again.

pdflatex (TeX Live 2026, article): `\noindent\pagebreak`, `\indent\pagebreak`
and `\textbf{\pagebreak Bold}` before a two-line paragraph end page 1 after
the paragraph's first line; `\label{a}\pagebreak` ends it before the
paragraph. A mid-paragraph `\pagebreak` (inline, on its own line, `[1]`,
`[2]`, `\nopagebreak`) was already right on this stack.

What was run:
- cargo test --lib -- pagebreak: test result: ok. 6 passed; 0 failed
- cargo test (crates/compiler): see the PR

Next step: re-pin vendor/compiler for the pipeline tests in the stacked
pipeline PR.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

---------

Co-authored-by: GoKubar <[email protected]>
GoKubar pushed a commit that referenced this pull request Sep 15, 2026
… end the paragraph (GH-FLOAT-IN-PARAGRAPH) (#608)

* render-pipeline: a float on its own lines inside a paragraph does not end it

What changed:
- floats::mask: a float span alone on its line(s) starts with `%` instead of
  a space, so the masked source has a comment line, not a blank line that the
  compiler read as `\par`. Byte offsets are unchanged.
- floats::scan: a float right after another float (one newline between)
  takes that float's mode, since `\end{figure}` is no paragraph end.
- tests/float_in_paragraph.rs pins [h], [t], table, two floats, a `\par`
  inside the float body and the between-paragraphs control to pdflatex.

What was run:
cargo test --release --test float_in_paragraph: test result: ok. 4 passed; 0 failed
same test without the src change: test result: FAILED. 1 passed; 3 failed
cargo test --release --lib floats::: test result: ok. 5 passed; 0 failed

Next step: full render-pipeline release suite and the PR.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: keep the blank line for float.sty's [H] inside a paragraph

What changed:
- floats::mask leaves an unstarred `[H]` float's line blank: `\float@endH`
  ends the paragraph with `\par`, so pdflatex splits `First.\n<[H]>\nSecond.`
  (probe: `Second.` starts an indented paragraph below the box).

What was run:
cargo test --release --lib floats::: test result: ok. 5 passed; 0 failed
cargo test --release --no-fail-fast (render-pipeline): 380 passed; 0 failed; 3 ignored
#599 export + #583 compiler, --features linebreak-skip, page_para_control: test result: ok. 19 passed; 0 failed

Next step: open the PR.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: a float spelled inside verbatim, \verb or a comment is no float

What changed:
- floats::scan skips adapter::opaque_regions: the verbatim/lstlisting/
  Verbatim/alltt bodies and \verb/\lstinline arguments that
  adapter::literal_spans already finds, plus minted and comment bodies.
  A `%` inside such a region starts no comment, and `\\%` now does.
- Pre-existing on main: scan matched `\begin{figure}` inside verbatim and
  mask blanked it to spaces. #608's `%` mask made it worse (a visible `%`
  where pdflatex prints `\`). `% \begin{figure}` alone was already skipped.
- Tests: unit lookalikes for every construct; render tests that verbatim,
  lstlisting and \verb lookalikes render identically to the same block
  spelled `fIgure` (fail on the previous commit), a commented float, and a
  real float right after a verbatim block.

What was run:
- cargo test --release --test float_in_paragraph: test result: ok. 9 passed; 0 failed
  (4 of the new ones FAILED against 3dbf05f's floats.rs)
- floats_oracle: ok. 2 passed; float_body_oracle: ok. 1 passed;
  float_notes_oracle: ok. 1 passed; listings_keys: ok. 9 passed;
  bundled_typewriter: ok. 5 passed
- cargo test --release (render-pipeline): 386 passed; 0 failed; 3 ignored

Next step: re-review #608.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
GoKubar added a commit that referenced this pull request Sep 15, 2026
 grew the inventory

Generated artefacts (docs/user/compiler.md, coverage.md) conflicted again;
took main's copies and regenerated via render_supported_latex.sh so
\underbar and main's additions both appear, sync --check clean.

Implementation-Agent: fable-rebase-a
Commit-Executor: fable-rebase-a (direct; Cursor usage limit)
GoKubar added a commit that referenced this pull request Sep 15, 2026
…rew the inventory

docs/user/compiler.md (generated) conflicted again; took main's copy and
regenerated via render_supported_latex.sh so the frame environment and
main's additions both appear, sync --check clean.

Implementation-Agent: fable-rebase-a
Commit-Executor: fable-rebase-a (direct; Cursor usage limit)
GoKubar added a commit that referenced this pull request Sep 15, 2026
… (#646)

* render-pipeline: tabular lengths keep their group scope; \small survives a float caption; @{} glue (#56)

What changed:
- Table lengths (\tabcolsep, \arrayrulewidth, \doublerulesep, \extrarowheight,
  and longtable's) are read as seen at the table: only assignments whose
  group ({...}, \begingroup, an environment) is still open count, in every
  form (\setlength{\x}{v}, \setlength\x{v}, \addtolength, \x=v). The old
  scan took the last brace-form \setlength anywhere in the file.
- A float-level size declaration (\small before \caption) is carried into
  later content runs, as \@caption's \normalsize is inside its own group.
- @{...} material keeps glue at both ends (@{\hspace{1em}}, @{\quad}).
- \hspace{<n>em} is set as <n> quads of the current font, not the
  compiler's fixed-size em.
- 17 new tabular corpus fixtures (107-123) with pdflatex references.

What was run:
- oracle.py check: main 117/123, this branch 123/123 (words 0.5 bp, rules 0.1 bp)
- cargo test --release (render-pipeline): 79 test binaries ok, 0 failed
- tabular_oracle: test result: ok. 1 passed; 0 failed
- lib: test result: ok. 140 passed; 0 failed; 2 ignored

Next step: compiler PR accepting table length assignments without the
"not implemented here" warning / unknown \tabcolsep error.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: report/book number figures and tables within the chapter

What changed:
- floats::number follows report.cls/book.cls: \thefigure and \thetable are
  \ifnum\c@chapter>\z@\thechapter.\fi\@Arabic\c@figure, reset by
  \@addtoreset{figure}{chapter}. \chapter* and book's \chapter outside
  \mainmatter step nothing; \appendix zeroes the chapter counter and makes
  \thechapter \@alph. Captions and \ref both use the value.
- FloatSpec.number is the printed string ("1.2"), not a bare counter.
- New pdflatex-pinned fixtures in fixtures/float-numbering (report chapters
  with \chapter*, report appendix, book front/main/back matter, an article
  control) and tests/float_numbering_oracle.rs: caption label, page and
  position within 1 bp, and the resolved \ref line.

What was run:
- cargo test --test float_numbering_oracle: test result: ok. 1 passed; 0 failed
- same test on origin/main sources: 17 mismatches (e.g. "Figure 1:" for
  pdflatex's "Figure 1.1:", chapter two's first figure printed "Figure 3")
- cargo test --test floats_oracle: ok. 2 passed; float_body_oracle: ok. 1
  passed; float_notes_oracle: ok. 1 passed; toc_oracle: ok. 1 passed;
  footnotes_oracle: ok. 1 passed; --lib floats: ok. 4 passed

Next step: open the GH-69 PR with the object-stream PDF sizing commit.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: size PDF graphics whose page tree is in object streams

What changed:
- graphics::probe_pdf falls back to flashtex_pdf::reader when the byte scan
  fails on a PDF with /ObjStm (PDF 1.5 object streams, pdfTeX's default
  \pdfobjcompresslevel 2). Before, every such PDF was image_unavailable and
  took no space. CropBox/MediaBox/Rotate handling is shared (page_info).
- New fixtures/float-graphics: a 72 dpi PNG and two pdfTeX object-stream
  PDFs (one /Rotate 90), made by make_fixtures.py; oracle.py pins box size and
  position from pdflatex. tests/float_graphics_oracle.rs checks
  width=\linewidth, scale, keepaspectratio, angle before/after a size key,
  \textwidth multiples, and the PDFs, within 1 bp, with no image diagnostic.
- Unit test graphics::tests::pdf_object_streams_are_read.

What was run:
- cargo test --test float_graphics_oracle: test result: ok. 1 passed; 0 failed
- same test without the graphics.rs change: 7 mismatches
- cargo test --lib graphics: test result: ok. 8 passed; 0 failed

Next step: [H] from the float package, then the PR.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: float.sty [H] sets the box exactly where it stands

What changed:
- FloatSpec::exact_here: with \usepackage{float}, a vertical-mode [H]
  float is not a float (\@float@HH). paginate splices \float@endH's
  \vskip\intextsep, the box and \vskip\intextsep at its marker, with TeX's
  interline glue (\lineskip against the line above; the next line's glue
  against the box's zero depth). It is never deferred or counted.
- [H] in the middle of a paragraph or on a two-column figure* now has its own
  diagnostic and falls back to h. [H] without the package keeps its old one.
- packages: float is implemented by the pipeline. \floatstyle, \restylefloat
  and \newfloat are still diagnosed by the compiler.
- fixtures/floats: make_fixtures.py adds 11-float-h and
  12-h-passes-deferred. oracle.py takes fixture names, so only those two
  were pinned; the other 10 sources and references are byte-identical.
  floats_oracle expects 12 fixtures, plus a diagnostics test for [H].

What was run:
- cargo test --test floats_oracle: test result: ok. 3 passed; 0 failed
  (11-float-h 2/2 pages, 13 anchors, max 0.002 bp; 12-h-passes-deferred
  3/3 pages, 9 anchors, max 0.003 bp)
- same fixtures on the pre-change sources: 26 mismatches
- cargo test --lib: test result: ok. 138 passed; 0 failed; 2 ignored
- float_body_oracle, float_notes_oracle, footnotes_oracle, toc_oracle,
  multicol_oracle, twocolumn_title_oracle: ok, 1 passed each;
  graphics_draft_demo: ok. 3 passed; float_numbering_oracle: ok. 1 passed;
  float_graphics_oracle: ok. 1 passed

Next step: open the GH-69 PR and post the verification table on #69.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: \chapter in an \include'd file is a chapter

What changed:
The adapter read structural body commands (\chapter, \part, \appendix,
book matter, marks/page styles, \addcontentsline) from the entry
document's source only. A \chapter in chapters/one.tex was set as a plain
paragraph on the current page: no page clear, no number, no marks, no
contents line. Included documents now get the same scan; their commands
are laid out before that document's next unit, and any left after its
last unit are laid out when the entry document resumes. \maketitle,
\noindent, contents lists and nested \input stay entry-only.

Corpus extended/project-book-include (#42): 5 pages -> 7 (pdflatex 7).

What was run:
cargo test --release (render-pipeline): passed 377 failed 0 ignored 3
test result: ok. 2 passed; 0 failed (chapter_in_included_file)
test result: ok. 1 passed; 0 failed (input_order_oracle)
test result: ok. 1 passed; 0 failed (toc_oracle)
test result: ok. 20 passed; 0 failed (flashtex-cli cli)

Next step:
\include's own \clearpage before/after (article: pdflatex 3 pages, we
set 1) and the missing CONTENTS running head in book front matter are
separate follow-ups.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* pdf: an ellipsis's periods no longer make every period extract as "…"

What changed:
- v2 export reduced cluster text to ToUnicode by first use. The pipeline sets
  `\textellipsis` as three periods in one cluster whose text is "…", so the
  period glyph was mapped to U+2026 for the whole font: the ellipsis
  extracted as "………" and every later sentence-final period as "…"
  (measured on "em dash… ellipsis." in OT1 and T1+lmodern documents).
- Only a one-glyph cluster now names its glyph's text. A glyph seen only
  inside clusters of several glyphs takes the character the font's own cmap
  maps to it (new `TrueTypeFont::char_for_glyph`, lowest code point), and the
  cluster text only when the cmap has none. Ligatures (`fi`, one glyph)
  still extract as their cluster text.
- tests/v2.rs: `ellipsis_periods_keep_the_period_in_to_unicode` (fails on
  main with `{28: "a", 88: "…"}`).

What was run:
- cargo test --release --test v2
  test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
- cargo test --release (crates/pdf, whole crate): 118 passed, 0 failed
- flashtex build --v2 + flashtex-pdf-exact from-v2 on the survey documents
  d4-punct-ot1 / d5-punct-t1-lm: "em dash……… ellipsis…" -> "em dash... ellipsis."

Next step:
- Re-pin crates/render-pipeline/vendor/pdf so `flashtex build` and Export
  PDF pick it up (vendor re-pins are the integration lane's).

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* math-layout: TeX's math font kerns (make_ord, tex.web §752) from the TFM lig/kern programs

What changed:
- tools/gen_cm_tfm.py emits each font's lig/kern program (lig_kern_starts,
  lig_kern, kerns) read from the real TFMs; cm_tfm.rs and ams_tfm.rs
  regenerated (additions only; existing char rows unchanged).
- tfm.rs: TfmFont::lig_kern walks the program as TeX does (first matching
  instruction; a ligature shadows a later kern).
- MathFontMetrics::ord_pair (default None) + CmMathMetrics impl: same-family
  check via symbol_slot, the scaled kern, and whether the font is a text font.
- layout.rs: make_ord appends the kern after an unscripted Ord character
  followed by an Ord..Punct character of the same family, and drops the
  italic correction in a text font (§755). Bins demoted by Rule 6 are not kerned.

What was run:
- cargo test --test math_font_kerns: test result: ok. 2 passed; 0 failed
- cargo test (math-layout): all suites ok (12, 4, 5, 28, 4, 2, 11 passed; 0 failed)

Next step: feature-gated forwarding in render-pipeline's TexMathMetrics, then HW1 and amsmath corpus measurement.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: an em is the quad of the font in force; table lengths follow macro invocations (#525 review)

What changed:
- `\hspace{<n>em}`, `\quad` and `\qquad` in running text are now set in
  quads of the font current where they are read. `Item::Quad` carries a
  style: the series/family come from the source declarations at the
  command, the size from the compiler's sizes of the text around it
  (`glue_size`). Before, the quad was the paragraph's base font, so
  `{\Large Ff\hspace{2em}Gg}` was 8.165 bp short and `{\bfseries ..}`
  2.989 bp short.
- The blank after `\hspace{..}`'s closing brace is an ordinary space.
  It was being skipped as if it followed a control word (3.3-3.9 bp).
- Size environments (`\begin{small}..\end{small}`, all ten sizes) give
  text, rules, kerns and tables their size unless a declaration made
  inside is still in force. A paragraph whose `\par` is read inside one
  gets that size's `\baselineskip`. The compiler's "environment is not
  implemented" warning for them is superseded.
- `length_at` applies the `\setlength`/`\addtolength`/`\<len>=` a user
  macro makes at the top level of its body (nested macros too, `#k`
  from braced arguments) at the invocation, with the invocation's group
  scope. An assignment that cannot be read (optional argument, unbraced
  argument) is left out and reported as a `table_limitation` warning.
- Corpus fixtures 124-126 (`\hspace{em}`/`\quad` under
  `\small`/`\normalsize`/`\Large`, `\bfseries` and size environments, in
  body text and tables, at 10/11/12pt), 127 (size-environment
  paragraphs) and 128 (macro `\setlength`/`\addtolength` before tables),
  with pdflatex references. Unit tests:
  table_lengths_follow_macro_invocations,
  size_environments_give_their_size_until_a_declaration,
  glue_takes_the_size_of_the_text_it_is_read_with.

What was run:
- python3 oracle.py check --render .../flashtex-render: TOTAL 128/128 (words 0.5 bp, rules 0.1 bp)
- cargo test --release (crates/render-pipeline): 79 test binaries, all "test result: ok", 0 failed
- lib: test result: ok. 143 passed; 0 failed; 2 ignored
- tests/tabular_oracle.rs: tabular_oracle: 128/128 fixtures match pdflatex; test result: ok. 1 passed; 0 failed

Next step: re-review of #525.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: math-font-kerns feature forwards math-layout's ord_pair (off until re-pin)

What changed:
- Cargo.toml: new off-by-default `math-font-kerns` feature; render-pipeline
  depends on vendor/math-layout (not crates/math-layout), which predates
  MathFontMetrics::ord_pair.
- mathtex.rs: TexMathMetrics::ord_pair asks the embedded CM programs for
  families 1-3 and the installed rm-lmr TFM for family 0.
- mathtext.rs: TextRunMetrics forwards, never kerning a \text handle.
- tests/math_font_kerns.rs (feature-gated): glyph origins of $r,a,b$,
  $f,P,Y.$, $f(x)$ $\Gamma,\Delta$ $x_1,x_2$ $V_{a}$ and HW1's display
  against pdflatex within 0.02 bp.

What was run (scratch copy of crates/render-pipeline with vendor/math-layout
replaced by this branch's crates/math-layout, feature on; vendor/ untouched):
- cargo test --release --features math-font-kerns --test math_font_kerns: test result: ok. 1 passed; 0 failed
- same test with ord_pair forced to None: fails, $r,a,b$ glyph 1 +0.608 bp, $f,P,Y.$ glyph 5 +3.633 bp
- amsmath corpus oracle.py check: TOTAL 59/59 within 0.5 bp (before and after)
- rank.py --only hw1: page 2 within 0.5 bp 203 -> 212; the 9 kern words (lines 560.9/585.4) from 0.60-0.61 bp to <=0.005 bp; no other word moved by more than 0.005 bp
- cargo build --release --bin flashtex-render against vendor/ (feature off): ok

Next step: re-pin vendor/math-layout (integration lane), then make math-font-kerns a default feature.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* math-layout: keep the ord_pair imports and impl clear of #470's lines

What changed: separate use lines for MathChar/OrdPair and CmMathMetrics::ord_pair moved after accent_sizes, so this branch merges cleanly with #470 (tag-textrun). No behaviour change.

What was run:
- cargo test (math-layout): every suite test result: ok, 0 failed

Next step: open the PR.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: number floats in the order the \include tree is read

What changed:
- adapter::reading_order walks \input/\include from the entry file
  (compiler lookup: path, then path.tex; the preamble's last \includeonly;
  cycles and unknown files read nothing) into ordered byte ranges.
- floats::number steps chapter/appendix/matter and the figure/table
  counters over those ranges, so an entry-file float after an \include
  whose file has its own \chapter gets 2.1, not 1.2. A float of a file
  never read (\includeonly-excluded) has no number, label, spec or .lof
  line.
- LoF/LoT entries take the float's own number (report pre-chapter float
  is "1", not "0.1") and merge in reading order.
- Float markers in paginate are placed by reading order, so an entry
  float after an included chapter follows that chapter's blocks.
- \include issues its \clearpage before the file and after it.
- Fixtures 05 (report, two files), 06 (book, \include + \input +
  appendix include), 07 (report, \includeonly) with pdflatex references;
  oracle.py handles multi-file projects; tests/include_float_lists.rs pins
  LoF/LoT/\ref against pdflatex's .lof/.lot/.aux.

What was run:
cargo test --release --test float_numbering_oracle
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
cargo test --release --test include_float_lists
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
cargo test --release --test toc_oracle
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
cargo test --release --test floats_oracle
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
cargo test --release --lib reading_order
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 140 filtered out

Next step: full crate run, then PR stacked on #537 and #538.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* math-layout: math ligatures in make_ord and kerns/ligatures inside text runs (tex.web §752-§753)

What changed:
- `OrdPair` carries the pair's ligature instruction (`OrdLigature { op, ch }`);
  `CmMathMetrics::ord_pair` reports cmr's `=:` ligatures (ff, fi, fl, ffi,
  ffl, and the quote/dash/Spanish marks) as Unicode text characters, and
  `text_glyph` boxes those characters from their OT1 slots.
- `layout`: the first pass runs `make_ord` over the list before boxing. A
  ligature rewrites the list as §753 does: `=:` merges the pair (the ligature
  takes the right atom's scripts), `=:|`/`|=:` replace one side, `|=:|`
  inserts, and the pair is retried unless the op is a `>` form. So
  `$\mathrm{f}\mathrm{i}$` is one fi glyph and `$\mathrm{f}\mathrm{i}^2$` is fi^2.
- `make_text` (`Nucleus::Text`, the multi-character `\mathrm{..}` and
  operator runs) applies the same program between its characters: the font
  kerns (`AV`, `Tr`, `Wa`) and ligatures (`ff`, `ffi`), last italic kept.
- tests/math_font_kerns.rs: 19 new widths pinned to pdfTeX `\wd0`, plus a
  synthetic program exercising every ligature form on both paths.

What was run:
cargo test --manifest-path crates/math-layout/Cargo.toml --test math_font_kerns
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
cargo test --manifest-path crates/math-layout/Cargo.toml
test result: ok. 12 / 4 / 5 / 28 / 4 / 3 / 2 / 11 passed; 0 failed
before this change the new widths fail, e.g. $\mathrm{AV}$ 15.13890pt vs pdfTeX 14.02777pt

Next step: forward ligatures through render-pipeline's TexMathMetrics and
one-character \mathrm groups; measure the pipeline against pdflatex.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: math ligatures and one-character alphabet kerns behind math-font-kerns

What changed:
- `TexMathMetrics::ord_pair` reads family 0's instruction straight from the
  installed rm-lmr TFM program (`Tfm::pair_program`, no text-mode boundary
  handling) and reports its ligatures, so `make_ord` forms them;
  `text_glyph` boxes a formed ligature (U+FB01 ...) from its OT1 slot.
- A one-character math alphabet pair of the same alphabet
  (`\mathbf{T}\mathbf{o}`, `\mathit{A}\mathit{V}`) is kerned from that
  alphabet's text-font TFM. Ligatures there are not formed (no character
  addresses a ligature slot of those fonts).
- `typeset`: a one-letter/digit `\mathrm{X}` is math-layout's `TextChar`
  (TeX §1186), so it joins its neighbour. All behind `math-font-kerns`.
- math-layout `cm::ligature_char` shared by both providers.
- tests/math_ligatures.rs pins glyph origins against pdflatex (lmodern).

What was run (scratch copy, vendor/math-layout := this branch's crate):
cargo test --release --features math-font-kerns --test math_ligatures
test result: ok. 1 passed; 0 failed
  negative control on #560's overlay: fails, "$x\mathrm{A}\mathrm{V}x$: glyph 2 at x 140.215 bp, pdflatex 139.003 (+1.212)"
cargo test --release --no-fail-fast --features math-font-kerns (whole crate): 377 passed; 0 failed; 3 ignored
oracle.py check: TOTAL 59/59 within 0.5 bp (before and after, per-fixture lines identical)
rank.py --only hw1: page 2 within 0.5 bp 212 of 215, pages 1 and 3 unchanged (same as #560)
worktree, feature off: cargo check --release --tests ok

Next step: open the PR stacked on #560.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* math-layout: keep the new layout.rs imports clear of #470's lines

What changed: the OrdLigature/SizeClass/Cow imports move to a block of their
own, so #560's import lines stay byte-identical and #470 still merges cleanly.

What was run:
git merge-tree --write-tree HEAD origin/agent/daniel-parent/tag-textrun: no conflict
cargo test --manifest-path crates/math-layout/Cargo.toml
test result: ok. 12 / 4 / 5 / 28 / 4 / 3 / 2 / 11 passed; 0 failed

Next step: open the PR stacked on #560.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: a chapter whose body is only a float still clears its page

What changed:
The adapter lays an \include'd file's structural commands (\chapter, ...)
out before that file's next unit (paragraph, heading, rule, picture). A
file whose whole body is a captioned float has no unit, so its \chapter
(heading, page clear, number) was never laid out and the floats piled onto
one page ahead of later text. Likewise a trailing entry \chapter with only a
float after it was dropped: the end-of-document loop handled only marks,
page styles and \maketitle.
- An entry \input/\include consumed without a unit of the file it reads
  (found from the reading order) lays that file's commands out in place,
  then \include's closing \clearpage.
- A unit of an included file flushes up to the command that reads its
  file, not merely the next \input/\include.
- Included files read so far are finished whenever the next file is read,
  not only when the entry file resumes.
- The unit loop takes one last pass after the last unit, so commands after
  it (\chapter, \include, marks, \maketitle) go through the same code; the
  separate trailing loop is gone.
tests/include_float_only_chapters.rs pins pages, lines and baselines
against pdflatex for two and three float-only \include'd chapters, the same
under \includeonly (with and without trailing text), and single-file
float-only chapters.

What was run:
cargo test --release --test include_float_only_chapters
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
same test without the adapter change: test result: FAILED. 0 passed; 3 failed
chapter_in_included_file: test result: ok. 2 passed; 0 failed
float_body_oracle: test result: ok. 1 passed; 0 failed
float_graphics_oracle: test result: ok. 1 passed; 0 failed
float_notes_oracle: test result: ok. 1 passed; 0 failed
float_numbering_oracle: test result: ok. 1 passed; 0 failed
floats_oracle: test result: ok. 3 passed; 0 failed
include_float_lists: test result: ok. 1 passed; 0 failed
input_order_oracle: test result: ok. 1 passed; 0 failed
toc_oracle: test result: ok. 1 passed; 0 failed
cargo test --release -p flashtex-render-pipeline --no-fail-fast: passed 386, failed 0, ignored 3

Next step: a float right after a body \clearpage (no \include) still lands
on the old page; that break is carried by the next block's eject and is
left to the #569/#583/#584 page-break stack.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: \check@icl italic correction and nested list closing skips (display-placement 35/36)

What changed:
- An upright text font command (\textbf, \textup, \texttt, \emph in italic
  text, ...) and amsmath's \eqref (\textup{\tagform@{..}}) put the italic
  correction of the character before them under the interword space
  (latex.ltx \check@icl -> \maybe@ic -> \sw@slant). Fixture 17's `(2.1).`
  was 0.784 bp left (the `f` of "Ref", kern 0.7922 pt).
- A list's closing \addvspace\@topsepadd uses the \topsep of the level that
  closes (was always level 1), with that list's own \partopsep flag; lists
  closing together and a following \item's \addvspace\itemsep keep the
  larger natural skip instead of the sum. Fixture 20's `2. Outer again` was
  7.97 bp low.
- A paragraph right after \end{itemize}/\end{enumerate} with no blank line
  is not indented (\@endpe), as after center/quote.
- Pins: tests/text_command_left_italic_correction.rs,
  tests/nested_list_end_skips.rs (pdflatex numbers; all four fail on main
  by -0.791, +7.970, -1.993, +3.985 bp); display_placement.rs PASSING adds
  17 and 20; baseline-render-pipeline.json refreshed.

What was run:
- display-placement oracle.py check: TOTAL 35/36 within 0.5 bp (main: 33/36;
  15 still fails on the rich \tag, owned by #470/#585)
- amsmath_corpus oracle.py check: TOTAL 59/59 within 0.5 bp
- cargo test --release -p flashtex-render-pipeline (all targets): 81 test
  binaries, 379 passed, 0 failed, 3 ignored

Next step: fixture 15 lands with #585 plus the math ToUnicode lane.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: math minus, asterisk and phi extract as the right Unicode

What changed:
- Math '-' extracts as U+2212 MINUS SIGN and '*'/\ast as U+2217 ASTERISK
  OPERATOR (both were ASCII); \phi/\varphi now extract as U+03D5/U+03C6
  (they were swapped). Glyph selection and positions are unchanged.
- Tests assert semantically correct Unicode, not pdflatex parity: pdflatex
  without the cmap package extracts cmex/cmsy glyphs as artefacts
  (\sum -> P, \mapsto -> 7->), which are deliberately not copied.

What was run:
- render-pipeline math targets: 68 passed, 0 failed
- render-pipeline lib: 138 passed, 0 failed, 2 ignored
- crates/pdf: all suites passed; git diff --check: passed

Next step:
- independent review.

Implementation-Agent: codex gpt-5.6-luna (max)
Commit-Executor: daniel-parent (committed Codex's working tree; sandbox blocked its git index)
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: keep only the four semantic math extraction fixes

What changed:
- The previous commit accidentally shipped the first-pass table that copied
  pdflatex's cmex/cmsy extraction artefacts (\mapsto -> 7->, \Longrightarrow
  -> =>, \circ -> bullet, \setminus -> ASCII backslash, ...). This commit
  applies the corrected working tree: extraction_text only maps '-' ->
  U+2212, '*' -> U+2217 and swaps \phi/\varphi; every other glyph keeps
  main's text. Tests assert semantically correct Unicode.

What was run:
- render-pipeline math targets and lib (see next comment on #597)

Next step:
- re-run tests; update #597.

Implementation-Agent: codex gpt-5.6-luna (max)
Commit-Executor: daniel-parent (staging slip in the previous commit)
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: long arrows extract as their drawn join pieces

What changed:
- The long arrows move out of common_math_glyph_runs_use_semantic_unicode
  into long_arrows_extract_as_their_drawn_pieces (option C from #536).
- A two-glyph join (#536's drawing) must extract as `=⇒` / `−→`, matching
  pdfTeX's own PDF (`x =⇒y −→z`, pdflatex + PyMuPDF). While main still draws
  one Latin Modern Math glyph, the text is the single `⟹` / `⟶`.
- A comment records that one `⟹` for two drawn glyphs needs PDF /ActualText
  marked content, a future crates/pdf change outside this PR.

What was run:
- math_symbols (debug): test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.46s

Next step:
- Merge into agent/daniel-parent/integration-preview and rerun math_symbols there.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* oracles: a math minus sign aligns with the references' hyphen-minus

What changed:
- tools/visual-oracle/rank.py `norm` folds U+2212 MINUS SIGN into U+002D
  before alignment. pdfTeX's own PDFs extract a math minus as U+2212
  (PyMuPDF on pdflatex's 19-vmatrix.pdf: "= ad −bc"; 28-xrightarrow.pdf:
  "f−→B", "h←−"), which is what this branch now emits. The pinned references
  read "-" only because pdftext's glyph-name table maps `minus` to "-". The
  references and FlashTeX are both right; the word matcher was not.
- amsmath_corpus/oracle.py `regroup` orders coincident glyphs (the \relbar
  and arrow head of \xrightarrow) with the same fold, so `−→` sorts like the
  references' `-→`.
- test_rank.py: a minus sign aligns with a hyphen-minus.

What was run:
- amsmath oracle, this branch's flashtex-render: TOTAL 58/59 after the norm
  fold alone (28-xrightarrow order tie), TOTAL 59/59 within 0.5 bp with both
- amsmath oracle, main's flashtex-render (36fe7ec): TOTAL 59/59 within 0.5 bp
- amssymb oracle, main and this branch: TOTAL 38/39 within 0.5 bp (both;
  32-braces-narrow fails identically on main)
- tabular oracle, main and this branch: TOTAL 106/106 (words 0.5 bp, rules 0.1 bp)
- display-placement oracle, main and this branch: TOTAL 33/36 within 0.5 bp (identical rows)
- python3 -m unittest discover -s tools/visual-oracle -p 'test_*.py': Ran 14 tests, OK

Next step: merge into the integration preview (#609) and rerun there.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* visual-oracle: candidate word text slices cluster byte ranges as bytes

What changed:
- rank.v2_words sliced the glyph run's Python str with the display list's
  cluster ranges, which are UTF-8 byte offsets. After the first non-ASCII
  character in a run (`∈`, and now this branch's U+2212 minus) every later
  glyph got its neighbour's text: `|f(x_k) − f(y_k)|` read as words `−f`,
  `(y` instead of `−`, `f(y`, and `x ∈ K` left an empty-text word. The
  sweep-2 "apparent regressions with identical pixels" (inline-math p1/p2,
  math-sheet p2, hw1 p1, conf-paper p2) were this. The amsmath oracle's own
  reader already encoded before slicing.
- test_rank.py: the v2 fixture helper writes byte offsets; a run with
  `−` and `∈` keeps its word text.

What was run (tools/visual-oracle/rank.py, all 22 real-world fixtures, same
flashtex-pdf-exact; aligned words summed over every page):
- old rank.py: main 36fe7ec 15285, preview 5d1eb06 15253
- this rank.py: main 15330, preview 15326
- pages whose aligned/within-0.5 counts differed main vs preview only
  through text (conf-paper p2, hw1 p1, inline-math p1/p2, math-sheet p1/p2,
  ps-calculus p2/p3, twelvept-plain p2, lecture-notes p2) are now identical
- amsmath 59/59, amssymb 38/39, tabular 106/106, display-placement 33/36
  (main) and 35/36 (preview): unchanged by this commit
- python3 -m unittest discover -s tools/visual-oracle -p 'test_*.py': OK

Next step: merge into the integration preview (#609).

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* render-pipeline: read each table length once per adapt call, not per table (#525 review, #623)

What changed:
- `length_at_checked` scanned the source before every table (a CmdScan of
  the prefix, plus a `group_open_between` rescan per assignment) for each
  of the four tabular lengths and the five longtable lengths. On a
  document with many tables that is quadratic or worse: 800 tables spent
  1.6 s in it. It is the same class of bug #623 fixed in
  `split_at_page_breaks`.
- Within an adapt call (`MacroDefsScope`) each length is now indexed once
  per document: `length_assignments` collects every `\setlength`/
  `\addtolength`/`\<name>=` and assigning macro invocation of the whole
  source once, `GroupTokens` lexes the group depth once (the tokens
  `group_open_between` counts, with the next-lower-depth token of each),
  and `LengthIndex` links each assignment to the last earlier one still in
  force at its end. A table binary-searches its byte offset and walks that
  chain past closed groups. The value and `unresolved` flag are folded in
  the same order as the scan, so the floats are bit-identical.
- Outside an adapt call, at a byte inside a control word, or for a document
  whose assignments do not form a chain (an assigning macro in another's
  argument, an assignment ending inside a comment), the old scan runs
  unchanged as `length_at_scan`.
- The indexes live in a new `lengths` field of `MacroDefsEntry`, placed
  before `index` so #623's `setlengths` field merges without conflict
  (`git merge-tree` of this commit with #623's head is clean).

What was run:
- `cargo test --release --lib -- table_length`: test result: ok. 5 passed; 0 failed
  - table_length_index_matches_the_prefix_scan: the indexed lookup equals
    the scan at every byte of 8 hand-written and 300 generated sources,
    for tabcolsep/arrayrulewidth/LTpre (both index and fallback paths hit).
  - table_lengths_scale_linearly_with_the_number_of_tables:
    before: 200 tables 41.2ms, 400 tables 242.7ms, 800 tables 1.637s (panicked: not linear)
    after:  200 tables 393µs, 400 tables 717µs, 800 tables 1.42ms
- flashtex-render end to end, generated doc, best of 3 (before -> after, v2 identical):
  200 tables 0.16s -> 0.08s; 400 tables 0.71s -> 0.22s; 800 tables 4.05s -> 0.73s
- v2 JSON + compile_result of all 128 tabular_corpus fixtures and 22
  fixtures/real-world documents, head 99defd5 vs this commit: `diff -rq` IDENTICAL (150/150)
- `oracle.py check`: TOTAL 128/128 (words 0.5 bp, rules 0.1 bp)
- `cargo test --release` (render-pipeline): exit 0, 79 test binaries, 383 passed; 0 failed; 3 ignored

Next step: merge #623 after #525 (or the reverse); the rest of the
remaining 800-table time is #623's `split_at_page_breaks` fix.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* integration: #639's layout_cache_keys test constructs #525's Item::Quad with its style field

Main's tests/layout_cache_keys.rs (#639) predates #525's Item::Quad
{ em, style }; the test's shared TextStyle fills the new field.

Implementation-Agent: fable-integration-rp
Commit-Executor: fable-integration-rp (direct; Cursor usage limit)

* integration: a file-tail float keeps its blank-line mask; include_float_lists expects #608's joined paragraph

Two #578 x #608 interactions on the combined head:

- floats::mask (#608) turned a float-only line into a % comment; for a
  float at the very tail of an \included file that left the paragraph
  open at EOF, and the compiler joined it with the entry document's
  next text, so #578's closing \clearpage landed after the merged
  paragraph (4 pages instead of pdflatex's 5). A float with nothing
  but blanks/comments after it now keeps the blank-line mask; entry
  documents are unaffected (\end{document} follows their floats).
- tests/include_float_lists.rs (#578) expected "Refs ..." on its own
  line; under #608 the [h] floats stay inside the paragraph (pdflatex
  behaviour), so the refs share the paragraph's line.

Implementation-Agent: fable-integration-rp
Commit-Executor: fable-integration-rp (direct; Cursor usage limit)

* integration: restore #543's entry-document chapter starts for \thelstlisting

The #578 delta removed the chapter_starts push together with the
chapter-based figure numbering it replaced, but #543's listing numbers
(list_blocks' Lol entries and listings::apply captions) still come from
chapter_numbers over those starts (toc_oracle fixture
37-report-lstlistoflistings).

Implementation-Agent: fable-integration-rp
Commit-Executor: fable-integration-rp (direct; Cursor usage limit)

---------

Co-authored-by: d-q222 <[email protected]>
@GoKubar
GoKubar deleted the agent/daniel-parent/page-control-followups-compiler branch September 16, 2026 04:16
ItsAkilesh pushed a commit to ItsAkilesh/flashtex that referenced this pull request Sep 18, 2026
What changed:
- `crates/render-pipeline/Cargo.toml` declares a new off-by-default feature
  `compiler-node-surface`. It carries no behaviour of its own: every arm it
  adds is the inert answer the pipeline already gave for a compiler node the
  current pin (`c95977d6`) cannot produce.
- The pipeline's exhaustive matches and node constructors now cover main's
  compiler surface behind that feature: `parser::Block::Penalty`/`Tabbing`,
  `parser::Inline::ThePage`/`PageNumbering`/`TabStop`/`TabJump`/`Marginpar`/
  `Penalty`/`PagePenalty`/`Discretionary`, `VSpace`/`HSpace` glue components,
  `math::Nucleus::TextRun`/`SideSet`/`Lap` and `math::Accent::Mathring`
  (compiler flash-tex#549, flash-tex#551, flash-tex#555, flash-tex#568, flash-tex#581, flash-tex#583, flash-tex#587, flash-tex#606, flash-tex#616).
  `adapter::vspace_block` is a new cfg'd constructor beside the existing
  `line_break_inline`; the one open-coded `Inline::LineBreak { .. }` left in
  the `\opening` lowering now goes through `line_break_inline` too.
- `tabbing` is lowered to flush-left paragraphs with one `unsupported_block`
  limitation, the way `LetterBlock` is, so no row is dropped by the re-pin.
- `docs/integration/repin-runbook.md`: the exact re-pin commands, the three
  vendor directories that must move (`compiler`, `tex-expansion`, and a new
  `bibliography`), the lockfile and `#[ignore]` edits `--locked` CI needs, the
  measured test deltas and the PRs the pin unblocks.

No file under `vendor/` is touched: the vendor swap used to measure all of
this was scratch-only and reverted. `git diff --stat origin/main...HEAD`
contains zero `vendor/` paths.

What was run:
Whole `crates/render-pipeline` suite, CARGO_BUILD_JOBS=4, --no-fail-fast:
  origin/main, pinned vendor, feature off:   469 passed, 13 failed
  this branch, pinned vendor, feature off:   469 passed, 13 failed (same 13)
  this branch, vendor re-pinned, feature on: 485 passed, 0 failed
The 13 red-on-main tests (letter_class_geometry x5, frame_env, underline_sout
x4, uline x2, xcolor_oracle) all pass after the re-pin.
Two re-pin-gated #[ignore]s also pass against the re-pinned vendor:
  test frame_draws_a_rule_border_around_its_content ... ok
  test coloneqq_decomposes_like_mathtools ... ok
crates/flashtex-cli against the same re-pinned vendor:
  test result: ok. 58 passed; 0 failed
cargo check --all-targets on this branch at the current pin: 0 errors.

Next step:
The integration lane applies docs/integration/repin-runbook.md section 3 --
swap the three vendor trees, move `compiler-node-surface` (and
`linebreak-skip`) into `default`, refresh both Cargo.locks, drop the two
`#[ignore]`s, update vendor/VENDORING.md.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
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.

2 participants