Keep nested tabulars inside their outer table
The table capture ended at the first \end{tabular}, so a nested table inside a
cell closed the outer table early and the remaining inner rows leaked into the
document. Track the nesting depth of \begin{tabular}/\end{tabular} and only
close the outer environment at depth zero.
Nested blocks are flattened before the outer halign parses them: inner rows are
split on \\ and cells on &, rule commands and \multicolumn/\multirow wrappers
are stripped, and the text is joined as "a b ; c d" inside the outer cell. The
outer structure, column count and row count survive; true nested-table layout
and \valign remain open.
A regression test wraps a 2x2 tabular in a 2-column outer table and checks one
captured table, two columns, two rows and the flattened inner text.
This commit is contained in:
1 parent
4b28d65006
commit
def93b6cf5
3 files changed
+236
-15
No files matched your search
+6
-3
@@ -370,7 +370,7 @@ Math coverage includes fractions/roots, scripts, `\left...\right` with body-scal
|
||||
|
||||
Paragraph units carry a `ParagraphFont`; `Unit::paragraph_with_face` and `Unit::paragraph_with_style_and_face` select Roman, bold, italic, mono, or sans. The corresponding Computer Modern TFM (`cmr10`, `cmbx10`, `cmti10`, `cmbxti10`, `cmtt10`, `cmss10`, `cmssbx10`, `cmssi10`, `cmcsc10`) supplies advances, kerns, ligatures, and italic correction for layout, the display list selects the matching face, and the PDF writes Computer Modern Type1 outlines for each built-in face (`cmr10`/`cmbx10`/`cmti10`/`cmbxti10`/`cmtt10`/`cmss10`/`cmssbx10`/`cmssi10`/`cmcsc10`, plus `cmmi10` for mathematical italic letters, `cmsy10` for math symbols and `cmex10` for big operators), falling back to Liberation subsets only for characters the Type1 encodings cannot address; those fallback glyphs keep their Unicode text under PDF extraction, so accented and Greek words round-trip; Type1 faces carry a ToUnicode CMap built from the requested characters, so glyphs whose names are ambiguous in the Adobe Glyph List (capital Omega, which would otherwise extract as U+2126) keep their intended code points. `Engine::edit` preserves the face when reflowing an edited paragraph.
|
||||
|
||||
The crate currently has 437 unit tests plus ten route-D integration tests and forty-two oracle fixtures. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 986 tests (437 route-D unit, 361 engine binary unit, 10 route-D integration, 42 oracle, 71 v1 integration, 60 server, 4 engine unit, 1 core unit), with none ignored. v1 remains the live server path.
|
||||
The crate currently has 437 unit tests plus ten route-D integration tests and forty-two oracle fixtures. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 987 tests (437 route-D unit, 362 engine binary unit, 10 route-D integration, 42 oracle, 71 v1 integration, 60 server, 4 engine unit, 1 core unit), with none ignored. v1 remains the live server path.
|
||||
|
||||
### M0 incremental demo
|
||||
|
||||
@@ -537,8 +537,11 @@ honest open items against the "feature-complete LaTeX compiler" objective are:
|
||||
expand to those metrics; a box whose content is only an image still measures
|
||||
as empty text.
|
||||
- **Tables**: `\multirow` centres over its rows, `array` column modifiers
|
||||
`>{}`/`<{}` and the outer `\tabcolsep` margins are parsed; nested tables and
|
||||
`\valign` remain unmodelled.
|
||||
`>{}`/`<{}` and the outer `\tabcolsep` margins are parsed. A nested
|
||||
`tabular` no longer terminates the outer capture: its rows and cells are
|
||||
flattened into one text run inside the cell (`a b ; c d`), so the outer
|
||||
structure survives, while true nested-table layout and `\valign` remain
|
||||
unmodelled.
|
||||
- **Fonts**: the twelve Computer Modern faces and four math faces are embedded
|
||||
as Type1 with per-glyph Liberation fallback. Greek math commands now map to
|
||||
their Unicode letters and render through the math-italic fallback (widths
|
||||
|
||||
Reference in new issue
Block a user