Header Cell
Documentation for the `header-cell` function.
Explicitly defines a cell as a header cell.
Header cells help users of Assistive Technology (AT) understand and navigate complex tables. When your table is correctly marked up with header cells, AT can announce the relevant header information on-demand when entering a cell.
By default, Typst will automatically mark all cells within table.header as header cells. They will apply to the columns below them. You can use that function's level parameter to make header cells labelled by other header cells.
The pdf.header-cell function allows you to indicate that a cell is a header cell in the following additional situations:
- You have a header column in which each cell applies to its row. In that case, you pass
"row"as an argument to thescopeparameter to indicate that the header cell applies to the row. - You have a cell in
table.header, for example at the very start, that labels both its row and column. In that case, you pass"both"as an argument to thescopeparameter. - You have a header cell in a row not containing other header cells. In that case, you can use this function to mark it as a header cell.
The API of this feature is temporary. Hence, calling this function requires enabling the a11y-extras feature flag at the moment. In a future Typst release, this functionality may move out of the pdf module so that tables in other export targets can contain the same information.
#pdf.header-cell(
level: int,
scope: str,
cell
) -> contentParameters
Prop
Type