Repository navigation
render-pipeline: lay tabular out with the kernel alignment model (tabular corpus 1/54 -> 45/54) - #116
Merged
Merged
Conversation
Tables were flattened to their cells' text (unsupported_block). table.rs now lays the compiler's parsed tabular/tabular* out as one box in the paragraph: \halign column widths with \multicolumn excess in the last spanned column (TeX 801), \tabcolsep/\arrayrulewidth/\doublerulesep (read from \setlength), zero-width centred | rules, \@arstrut from the size's \strutbox times \arraystretch, \\[d], \hline/\hline\hline/\cline, p{} as \vtop with \@finalstrut, tabular* \extracolsep{\fill}, [t]/[b]/[c], booktabs rules at the body font's em/ex. Cells are shaped by the pipeline's TFM paragraph path and painted as nested blocks plus display-list rules; blocks holding a table are not cached.
Oracle corpus crates/compiler/tests/tabular_corpus (54 fixtures, pdflatex word and rule positions): main 1/54, this branch 45/54. tests/tabular_oracle.rs pins the 45.
Implementation-Agent: Claude Opus 5 (subagent kabir-claude tabular fidelity, mac-m5pro-kabir)
Commit-Executor: Claude Code direct Git
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
…ults Implementation-Agent: Claude Opus 5 (subagent kabir-claude tabular fidelity, mac-m5pro-kabir) Commit-Executor: Claude Code direct Git Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
Member
|
Merged to main via integration/2026-09-13h (Commander). |
This was referenced Sep 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Before this PR the render pipeline (the product path) flattened every
tabularto its cells' text with anunsupported_blockwarning. Tables are now laid out as one box in the paragraph, using the LaTeX kernel's alignment model plus booktabs (crates/render-pipeline/src/table.rs, citing latex.ltx 2026 and booktabs.sty line by line):\haligncolumn widths, with\multicolumnexcess pushed into the last spanned column (TeX §801); columns with no entries are zero-width.\tabcolsep,\arrayrulewidthand\doublerulesepcome from\setlength.|rules take no width, are centred on their boundary and run the full row;||is separated by\doublerulesep.\@arstrutis the\strutboxof the size in force (size1x.clo) times\arraystretch.\\[d]works for positive and negatived;\hline,\hline\hlineand\clineare supported.p{}: set as a\vtopunder\@arrayparboxrestore/\sloppy, with\@finalstrut.tabular*distributes leftover width through\extracolsep{\fill}.[t]/[b]/[c]use\vtop/\vbox/\vcenteron the math axis.\cmidrule(lr)at the body font's em/ex.No compiler source changes.
vendor/compileris main's pin (ad720575, byte-identical tocrates/compiler/src), so no re-pin is needed.Evidence
The oracle corpus
crates/compiler/tests/tabular_corpus/has 54 one-page 12pt fixtures and anoracle.pythat reads pdflatex word origins plus rule rectangles from the PDF content stream. A fixture passes when every word is within 0.5 bp and every rule within 0.1 bp.|,||,@{}(01-09)cargo test --releaseis green forcrates/compilerandcrates/render-pipeline. The newtests/tabular_oracle.rspins the 45 passing fixtures, andtable.rshas font-free geometry unit tests.cv(tabular*) changes; aligned words and errors are unchanged.Not fixed here (owners)
p{}breaking (11, 52): paragraph-layout'sbadness()returns infinity above a stretch ratio of 1.29. TeX §108 only does so above 1290/297 ≈ 4.34. Under\sloppy(tolerance 9999), TeX's loose lines are therefore infeasible, and the emergency pass sets them under-width.\,reaches the pipeline as a literal comma (compiler text pass).>{}/<{},m/b,!{}and\extrarowheightare diagnosed as unsupported by the parser.arrayinline (33): math grid layout.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu