Overlarge nested table with repeat: false header causes empty first page
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 56.1k
- Forks
- 1.7k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 22
Description
Description
When nesting an overlarge table inside another table, with the inner table's header having repeat: false on it. Typst will render the first page without any content despite there being no benefit to the contents being moved to the second page.
#set page(
height: 50mm,
width: 50mm,
margin: 5mm,
)
#table(
columns: 1fr,
inset: 0mm,
stroke: 0.5pt + black,
table.cell(breakable: true, fill: silver,
table(columns: 1fr, inset: 2mm,
table.header(repeat: false, box(height: 5mm, [Nested Table Header])),
table.cell(box(fill: green, height: 50mm, width: 36mm, [Nested Table Contents]))
)
),
)
This issue stops occurring if the header's set to repeat: true instead. I assume this is caused by some misbehavior with layouting due to headers being sticky to their first row but some calculation not keeping this into account when the header is set to not repeat.
Operating system
Linux, Web app, Windows
Typst version
- I am using the latest version of Typst
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the supplied nested-table Typst snippet and compare the pagination behavior with the inner header set to repeat: true. Trace the table layout and pagination handling for repeat: false; done means the overlarge nested table no longer produces an empty first page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100