Table cell block height is incorrect when inside of a figure
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 a table is inserted in a figure, the block containers generated by each cell incorrectly extend the height of the entire page. This can be seen by applying a color to blocks. The extended blocks do not affect the layout of other elements on the page. When a standalone table is created outside of the figure, the blocks are correctly the same size as the cells.
Code to reproduce and visualize the bug:
#set block(
fill: rgb("#00000030"),
stroke: rgb("#ff000060"),
)
This standalone table works as intended:
#table(
columns: 3,
[a], [b], [c],
[1], [2], [3],
)
#figure(
table(
columns: 3,
[a], [b], [c],
[1], [2], [3],
),
caption: [This table inside of a figure is bugged.],
)
#lorem(50)
Output:
Operating system
Web app
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 with the minimal Typst reproduction in the issue and compare the standalone table with the same table inside a figure in the web app. Trace how figure layout determines each table cell's block height; done means the highlighted blocks inside the figure match their cells instead of extending across the page, without changing surrounding layout.
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
- 55/100