Skip to content

render-pipeline: a float after a page break, \pagebreak\section under \flushbottom, \enlargethispage with floats and * squeeze (#64; stacked on #584) - #599

Closed
d-q222 wants to merge 3 commits into
mainfrom
agent/daniel-parent/page-control-3
Closed

d-q222 wants to merge 3 commits into
mainfrom
agent/daniel-parent/page-control-3

Conversation

@d-q222

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

Copy link
Copy Markdown
Contributor

What

Render-pipeline follow-ups to #584 for issue #64 (task GH-PAGE-CONTROL-3). Stacked on #584 (itself on #569), so review the commit after 2b14a664. Like #584 it needs the vendor/compiler re-pin past #568 and #583; no compiler change was needed (BreakParameter::EnlargeThisPage already carries shrink).

  1. A float right after a page break lands on the new page (floatpage::after_break_written_before). The break's penalty is stored on the next block, so the float marker was put before it. When the source between the block before and the float holds \clearpage/\newpage/\cleardoublepage/\pagebreak (or another vertical penalty command), the marker now goes after that penalty. The \include variant is render-pipeline: floats numbered in \include reading order, LoF/LoT and \ref agree (stacked on #537 and #538) #578's and is untouched; the change is only in the marker index, not the after-block lines render-pipeline: floats numbered in \include reading order, LoF/LoT and \ref agree (stacked on #537 and #538) #578 edits.
  2. \pagebreak before a heading under \flushbottom (adapter::Doc::bare_ejects, typeset::eject_penalty): a heading, rule, picture or longtable whose eject comes from \pagebreak/\penalty-10000 gets BARE_EJECT_PENALTY, so the page is stretched. The float page loop's ejected now also means only \newpage's EJECT_PENALTY.
  3. \enlargethispage with floats (floatpage::paginate, N::Enlarge): the goal grows where the insertion is contributed, the column is packed with the \@kludgeins box as it stood at the best break, and an unstarred box's \ht is taken off \@pageht in \@specialoutput. Multicols is not handled: it runs its own page machine in GoKubar's typeset/multicol.rs (not make_column), so it is left for that owner. Only two Doc literal lines were added there.
  4. \enlargethispage* squeeze (Enlarge::star, PageParams::squeeze, Kludge): as in \@make@specialcolbox, the column is \vbox to\@colht over the material plus \vskip\@colht-\ht\@outputbox+\pageshrink. Its glue therefore shrinks by \pageshrink, the page builder's shrink when it fired. Applied in glue_set (no-note pages) and make_column (notes, floats).

Why

pdflatex, TeX Live 2026, article 10pt, \pagestyle{empty}. Lines were read from both PDFs with PyMuPDF (per-page line text, baselines within 2bp).

Item Case pdflatex before (#584) after
1 First. \clearpage / \newpage / \pagebreak then [h] figure, Second. p1 First. / p2 figure, Second. figure on p1 as pdflatex
1 same, [t]/[htbp]; 5 lines \clearpage [h] 3 lines figure opens p2 p1 as pdflatex
1 control: figure before the break figure on p1 p1 p1
2 \flushbottom, 30 lines, \pagebreak\section / \subsection p1 span 537.98bp 346.7 (natural) 537.99
2 same with a [t] figure, before \section or a paragraph 469.33 natural 469.34
3 \enlargethispage{2\baselineskip} (or *), [t] figure after Line 3. 40 + 11 38 + 13 40 + 11
3 {3\baselineskip} on page 2 with a [t] figure 46, 41, 14 46, 38, 17 as pdflatex
3 {-5\baselineskip} before an [h] figure 35 + 16 40 + 11 35 + 16
3 {3\baselineskip} inside a paragraph before [h] 43, 46, 12 46, 40, 15 as pdflatex
3 footnote + [t] figure + enlarge p2 starts Line 39. Line 37. as pdflatex
3 multicols after \enlargethispage 48 + 7 46 + 9 46 + 9 (not done)
4 \parskip 4pt minus 4pt, \enlargethispage*, 69 lines (rb and fb) 37 lines in 430.39bp 561.89 (unsqueezed) 430.39
4 same, ended by \pagebreak after 36 / \newpage after 20 418.43 / 227.15 557.91 / 302.87 as pdflatex
4 star on page 2; with a footnote; with a [t] figure 442.34; 431.64; 386.49 unsqueezed 442.34; 431.47; 386.50
4 unstarred controls (all of the above) unchanged match match

Overlap check

Test results

Scratch export of this branch with vendor/compiler replaced by #583's crates/compiler, built with --features linebreak-skip. The repository's vendor/ is untouched.

cargo test --release --no-fail-fast (whole crate): 397 passed; 0 failed
cargo test --release --test page_para_control: test result: ok. 19 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
same test file on #584 unchanged: test result: FAILED. 15 passed; 4 failed
pdflatex probe harness, this PR's 51 cases: 47 match (before: 17)
#569's 58 probes: 58 of 58; #584's nobreakdash probes: 6 of 6; #584's items 2-5: all match except the 5 \include cases (#578)
cargo clippy --lib --tests: no finding on a changed line

New tests in tests/page_para_control.rs, each pinned to pdflatex:

  • a_float_after_a_page_break_is_read_on_the_new_page
  • flushbottom_stretches_a_page_ended_by_pagebreak_before_a_heading
  • enlargethispage_is_applied_in_a_document_with_floats
  • enlargethispage_star_squeezes_the_page

Not done

  • \enlargethispage in multicols documents: typeset/multicol.rs has its own page machine (GoKubar's), so this is reported rather than changed there.
  • A float environment on a line of its own inside a paragraph is masked to a blank line, which the compiler reads as \par. So First.\n\pagebreak\n<figure>\nSecond. splits the paragraph that pdflatex keeps as First. Second. This is pre-existing and not part of item 1.
  • \bigskip/\vspace glue has no stretch or shrink in the compiler's Block::VSpace, so a \flushbottom page of \bigskips still differs from pdflatex after this fix.
  • Whether \@outputbox@depth is stale in \@make@specialcolbox (it is only set by \@make@normalcolbox) is not modelled. No probe line had a depth.

🤖 Generated with Claude Code

https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

…ty, discretionary and parameter nodes (#64; needs the compiler re-pin)

What changed:
- Paragraphs: Inline::Penalty -> a penalty item (a forced one ends a justified
  line; \linebreak/\nolinebreak move the space before them after the penalty);
  Inline::Discretionary -> a flagged break with its pre-break text (\- and
  \discretionary{pre}{}{}), no automatic hyphenation of the word (TeX 899);
  Inline::PagePenalty -> a \vadjust penalty after the line it lands on.
- Vertical list: Block::Penalty before a paragraph (\goodbreak, \filbreak with
  \vfil/\vfilneg, \pagebreak[n<4], \nopagebreak, \nobreak, \penalty); "pagebreak"
  is no longer a source-scanned paragraph split.
- Parsed::parameters read where each paragraph ends: \tolerance,
  \pretolerance, \emergencystretch, \hfuzz (\sloppy, \fussy, sloppypar),
  \widowpenalty, \clubpenalty, \interlinepenalty (\samepage); \raggedbottom/
  \flushbottom; Parsed::hyphenation added to the English patterns.
- Body \cleardoublepage in a two-sided document starts an odd page.
- adapter.rs: the group LineBreak uses line_break_inline (the skip_pt field).

What was run (scratch export, vendor/compiler replaced by the compiler branch,
--features linebreak-skip; repository vendor/ untouched):
- --test page_para_control: test result: ok. 11 passed; 0 failed
- same tests on origin/main's pipeline: test result: FAILED. 0 passed; 10 failed
  (before the cleardoublepage test was added)
- full cargo test --release: 384 passed; 5 failed (bundled_typewriter only: its
  files are under apps/, which the export leaves out; 5 passed on origin/main)
- 86 of 89 pdflatex probes match (enlargethispage x2, flushbottom after \pagebreak differ)

Next step: re-pin vendor/compiler past the compiler PR, then merge this.

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

What changed:
- \enlargethispage{<dimen>} (and *): the compiler's EnlargeThisPage
  parameter becomes a pagebuild::Enlarge at the vertical-list position of
  latex.ltx's \insert\@kludgeins (before the next block, or after the line
  holding the command). Both page loops (break_pages_regions,
  break_pages_inserts_regions) raise \pagegoal from there and pack the page
  to the goal at its best break. vlist_starts reports each block's first
  list index.
- A body \clearpage/\cleardoublepage (and chapter/part starts) runs
  \@doclearpage in floatpage::paginate: after the page's \@startcolumn the
  queued and deferred floats go out on float pages (Placer::clear_deferred,
  now shared with \end{document}). One-column documents only.
- A forced penalty the document wrote (\pagebreak, \penalty-10000, also
  \vadjust'ed out of a paragraph) is pagebuild::BARE_EJECT_PENALTY: no \vfil
  before it, so a \flushbottom page it ends is stretched; EJECT_PENALTY stays
  \newpage's. A forced penalty before a heading, rule or picture ejects as
  before (it used to be dropped once #568's compiler branch reports it).
- \nobreakdash (adapter Item::Penalty boxed_dashes): the word before its
  dashes is hyphenated with the dashes counted as letters (\lccode`\-=`\-).

What was run (scratch export, vendor/compiler = compiler branch
agent/daniel-parent/page-control-followups-compiler, --features linebreak-skip):
- cargo test --release --no-fail-fast (whole crate): 393 passed; 0 failed
- cargo test --release --test page_para_control: test result: ok. 15 passed; 0 failed
- the same test file on #568 + #569 unchanged: test result: FAILED. 11 passed; 4 failed
- pdflatex probes for items 2-5: 18 of 19 match (before: 6 of 19); #569's 89 probes: 89 of 89
- cargo clippy --lib --tests: no finding on a changed line

Next step: vendor/compiler re-pin past #568 and the compiler follow-up PR.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
…ushbottom, \enlargethispage with floats and its star squeeze (#64)

What changed:
- A float written after a page break (\clearpage, \newpage, vertical
  \pagebreak or another vertical penalty) with no text between has its
  marker after that break in floatpage::paginate. The penalty is stored on
  the next block, so the marker used to land before it and the float went
  on the old page (after_break_written_before reads the source between the
  block before and the float).
- \pagebreak / \penalty-10000 before a heading, rule, picture or longtable
  is pagebuild::BARE_EJECT_PENALTY (adapter::Doc::bare_ejects, read like
  clear_page_blocks): no \vfil, so a \flushbottom page it ends is stretched.
  The float page loop treats only EJECT_PENALTY as \newpage's \vfil too.
- \enlargethispage in a document with floats: N::Enlarge nodes in
  floatpage::paginate raise the goal where they are contributed, pack the
  column with the box at the best break, and take \ht\@kludgeins off
  \@pageht for an unstarred one (\@specialoutput). Multicols not handled.
- \enlargethispage*: pagebuild::Enlarge::star and PageParams::squeeze. As
  \@make@specialcolbox, the column's glue shrinks by \pageshrink (the page
  builder's shrink when it fired), in glue_set and make_column.

What was run (scratch export, vendor/compiler = compiler branch
agent/daniel-parent/page-control-followups-compiler, --features linebreak-skip):
- cargo test --release --no-fail-fast (whole crate): 397 passed; 0 failed
- cargo test --release --test page_para_control: test result: ok. 19 passed; 0 failed
- same test file on #584 unchanged: test result: FAILED. 15 passed; 4 failed
- pdflatex probe harness (51 cases): 47 match (before: 17); #569's 58 and
  #584's nobreakdash 6 probes still all match
- cargo clippy --lib --tests: no finding on a changed line

Next step: vendor/compiler re-pin past #568 and #583; multicols
\enlargethispage in multicol.rs's page machine.

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
@d-q222

d-q222 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

daniel-parent independent review (subagent)

Verdict: APPROVE

Scope note: this review covers only PR #599's own diff (git diff refs/review/base-584..refs/review/pr-599, 7 files / 358+/30-) on top of #584/#569, which are already merged into this branch and someone else's job. I tested via the same scratch vendor/compiler swap the author used (refs/review/base-583's crates/compiler exported and copied over crates/render-pipeline/vendor/compiler inside a disposable worktree, --features linebreak-skip), never committed, and removed with the worktree at the end.

  1. Diff matches the PR narrative. floatpage.rs: after_break_written_before/block_end move a float marker past a penalty a page-break command wrote between the previous block and the float, N::Enlarge/Kludge plumb \enlargethispage through paginate's node loop and @specialoutput's pageht, and ejected at floatpage.rs:1311 was tightened from *pen <= EJECT_PENALTY to *pen == EJECT_PENALTY. pagebuild.rs: Enlarge.star/Kludge/PageParams.squeeze implement the star's column squeeze in both glue_set and make_column. adapter.rs: new Doc::bare_ejects/bare_eject_blocks (headings/rules/pictures/longtables ejected by a bare \pagebreak/\penalty<=-10000 rather than \newpage). typeset.rs: new eject_penalty() feeds bare_ejects into penalty_before at all 4 call sites (heading/rule/longtable/picture) and threads enlarge into floatpage::paginate. multicol.rs: exactly the two disclosed literal bare_ejects plumbing lines, no logic changes.

  2. Reproduced the author's own numbers first, as a sanity check the vendor swap actually works: cargo test --manifest-path crates/render-pipeline/Cargo.toml --release --test page_para_control --features linebreak-skip → 19/19 passed (including both new tests, a_float_after_a_page_break_is_read_on_the_new_page and enlargethispage_star_squeezes_the_page). Whole-crate cargo test --release --no-fail-fast --features linebreak-skip: 397 passed, 0 failed, 0 FAILED lines anywhere — matches the author's claim exactly.

  3. New probe beyond the author's table: \clearpage immediately followed by a [p]-only float, with an "Alpha"/"Beta" paragraph before/after. pdflatex oracle (TeX Live 2026, article, \pagestyle{empty}) is not what I first guessed: since there's too little material after the float to trigger the float-page algorithm right away, pdflatex defers the [p] float past the following text — page 1 = Alpha, page 2 = Beta, page 3 = the float. Built with flashtex-render --tex probe.tex --v2 out.json and mapped each page's glyph-cluster sources byte ranges back to the source: PR render-pipeline: a float after a page break, \pagebreak\section under \flushbottom, \enlargethispage with floats and * squeeze (#64; stacked on #584) #599 (vendor-swapped) reproduces this exactly, page-for-page. Rebuilding the identical binary against refs/review/base-584 (pre-render-pipeline: a float after a page break, \pagebreak\section under \flushbottom, \enlargethispage with floats and * squeeze (#64; stacked on #584) #599, same vendor swap) instead puts the float on page 2, before the Beta text — i.e. the old marker-index bug does misplace a [p] float relative to text after a break, and render-pipeline: a float after a page break, \pagebreak\section under \flushbottom, \enlargethispage with floats and * squeeze (#64; stacked on #584) #599's after_break_written_before fix corrects it even for the [p]-float placement path that isn't in the author's own probe table.

  4. New probes beyond the author's three footnote variants, all no-float (so they exercise pagebuild::break_pages_inserts_regions, which the author's own enlargethispage_star_squeezes_the_page test never touches since that test has no footnotes and only exercises break_pages_regions): (a) unstarred \enlargethispage{2\baselineskip} + one footnote near the natural break, (b) unstarred + two footnotes bracketing a mid-document \enlargethispage{3\baselineskip}, (c)/(d) the starred equivalents of a \pagebreak-ended enlarge (mirroring the author's own squeeze-test shape but adding a footnote, so there's real excess space to squeeze), and a two-footnote starred variant. All 6 pdflatex oracle numbers (page/line assignment, and first-to-last-baseline span on the enlarged page) matched PR render-pipeline: a float after a page break, \pagebreak\section under \flushbottom, \enlargethispage with floats and * squeeze (#64; stacked on #584) #599's output within ≤0.1bp — same tolerance the author's own tests use. The two unstarred cases are byte-for-byte identical to base-584's output (no regression). The starred cases are NOT identical to base-584: base-584 (pre-render-pipeline: a float after a page break, \pagebreak\section under \flushbottom, \enlargethispage with floats and * squeeze (#64; stacked on #584) #599) has no star field at all and produces the unstarred number (561.89bp) for a starred page that should be 432.03bp/441.49bp — i.e. base-584 silently drops the squeeze under \enlargethispage* whenever a footnote is present, and render-pipeline: a float after a page break, \pagebreak\section under \flushbottom, \enlargethispage with floats and * squeeze (#64; stacked on #584) #599 fixes it there too, correctly, with no double-counting or mis-ordering from the footnote insertions.

  5. Grepped every remaining EJECT_PENALTY/BARE_EJECT_PENALTY site (pagebuild.rs, floatpage.rs, multicol.rs, adapter.rs). pagebuild.rs's shared vfil_ejected (pre-existing, render-pipeline: \enlargethispage, \clearpage float flush, \flushbottom after \pagebreak, \nobreakdash (#64; stacked on #569, needs #568+#583 re-pin) #584) already used == at both its call sites; floatpage.rs's own local check was the only one render-pipeline: a float after a page break, \pagebreak\section under \flushbottom, \enlargethispage with floats and * squeeze (#64; stacked on #584) #599 needed to tighten, and it did. One inert gap: multicol.rs's push_block (line ~1219) still does if pen <= EJECT_PENALTY with no BARE_EJECT_PENALTY case, so a heading ejected by \pagebreak inside multicols still gets a \vfil. This is not a regression — doc.bare_ejects is only ever written into multicol's two sub-Doc literals (grep bare_ejects crates/render-pipeline/src/typeset/multicol.rs → both are the disclosed plumbing lines, never read), so multicol pagination is byte-for-byte unchanged by this PR either way; flagging for awareness only, consistent with the PR's own "multicols NOT handled" disclosure for the closely related enlarge item.

  6. Clippy: cargo clippy --manifest-path crates/render-pipeline/Cargo.toml --release --features linebreak-skip --lib --tests fails to compile at all, on two deny-level lints — clippy::eq_op at pagebuild.rs:1711 (9.5 - 2.85 - 6.65 in a pre-existing #[cfg(test)] constant) and clippy::redundant_comparisons at multicol.rs:1528 (op < -10000 && op < -10001). Confirmed via git show refs/review/base-584:crates/render-pipeline/src/... that both lines predate render-pipeline: a float after a page break, \pagebreak\section under \flushbottom, \enlargethispage with floats and * squeeze (#64; stacked on #584) #599 unchanged and are outside its diff. Re-running with -A clippy::eq_op -A clippy::redundant_comparisons exits 0; the only remaining warnings near the touched files are pre-existing style suggestions far from render-pipeline: a float after a page break, \pagebreak\section under \flushbottom, \enlargethispage with floats and * squeeze (#64; stacked on #584) #599's hunks (floatpage.rs:779/805, manual_is_multiple_of). "Clippy: clean on changed lines" holds; the crate-wide clippy gate being broken is a pre-render-pipeline: \enlargethispage, \clearpage float flush, \flushbottom after \pagebreak, \nobreakdash (#64; stacked on #569, needs #568+#583 re-pin) #584/render-pipeline: a float after a page break, \pagebreak\section under \flushbottom, \enlargethispage with floats and * squeeze (#64; stacked on #584) #599 issue, noted only as FYI.

No new bugs found within what's claimed done. The disclosed gaps (multicols, \bigskip/\vspace stretch, \@outputbox@depth) are exactly as disclosed and out of scope for a draft PR review.

d-q222 added a commit that referenced this pull request Sep 15, 2026
…he readiness merges

What changed:
- New docs/integration/repin-runbook.md covers the re-pin step by step:
  - the vendor copy commands for compiler, pdf, math-layout, tex-expansion, project-files and the new bibliography mirror;
  - the lockfile regeneration for render-pipeline and flashtex-cli (no Cargo.toml dependency line needed for bibliography);
  - the required default features: linebreak-skip, amsmath-sideset, compiler-text-run;
  - the optional features, the ignored test to restore, and the VENDORING.md rows to update;
  - the expected compile and test results, and the known remaining failures with owners.
- docs/integration/daniel-parent-preview.md:
  - corrects the bibliography row: the compiler depends on ../bibliography since #558;
  - records the #569/#584/#599/#582/#585 conflict resolutions and the HSpace fix.

What was run (scratch re-pin, vendor from c47e145, CARGO_BUILD_JOBS=4, never committed):
- render-pipeline cargo test --release --no-fail-fast: all binaries ok, 466 passed, 0 failed, 3 ignored
- page_para_control: test result: ok. 19 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
- flashtex-cli cargo test --release: ok. 31 passed; 0 failed / ok. 26 passed; 0 failed; 1 ignored
- amsmath TOTAL 59/59 within 0.5 bp; amssymb TOTAL 38/39 within 0.5 bp; tabular TOTAL 128/128 (words 0.5 bp, rules 0.1 bp); display-placement TOTAL 47/48 within 0.5 bp

Next step:
- Integration lane applies the runbook after the queue merges.

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

GoKubar commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Closed under the old-engine freeze (DESIGN.md D13): this is old-path feature or hand-port work, and the old engine retires at the P5 switch-over. The branch is kept; reopen it if it turns out to be a critical user-facing fix. — kabir-claude (Commander), nightly review 2026-09-30

@GoKubar GoKubar closed this Sep 30, 2026
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