typst / typst/typst

table.header that are on the side of the table

Open
#6,561 1 comment 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request layout
Dominant language
Rust
Stars
56.1k
Forks
1.7k
Avg merge
3d 10h
Merged PRs (30d)
22

Description

Description

Table headers are super useful, because they repeat when they have a page break. But sadly they do not work when the header is places on the side and not on the top of the table.

This example shows the issue quite nicely. The header fills an entire row. But what if I want just the left cell to be a header and fill the rest with other data. The cells next to the header are empty although they should be filled with the x cells.

#table(
  columns: 2,
  table.header(table.cell(rowspan: 3)[test]),
  [x],
  [x],
  [x],
  [x],
  [x],
  [x],
)
Image
Use Case

This is use full in a case like this:

#table(
  columns: 2,
  table.cell(rowspan: 3)[100],
  [100a],
  [100b],
  [100c],
  table.cell(rowspan: 3)[200],
  [200a],
  [200b],
  [200c],
)

This looks like it should. Three numbers on the right are associated with one on the left.
Image

But in case of a pagebreak it looks like this. The numbers on the next page can not be associated correctly. If a table header would allow it to be vertical and repeatable, it would solve this issue.
Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two table examples in the issue, especially the page-break behavior with a side table.header. Then trace how table.header handles row and column spans during pagination. Done means a vertical header repeats on subsequent pages while adjacent cells retain the expected contents and existing table behavior remains intact.

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
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.