Skip to content

Table subheaders and subfooters #5377

@PgBiel

Description

@PgBiel

Description

Feature

(Split off from #3001)

Depends on #5375

Have the ability to specify "levels" of headers and footers, such that a table can be split into multiple sections (each section has a top-level header), and each section may have its own "internal" headers and footers (subsections) which repeat together with the top-level header / are also "sticky". They'd be repeated until the next top-level header, or the next subheader under the same top-level header.

This could be made flexible enough to accept any amount of nesting levels / subsub...subsections (probably rare for actual tables, but could be more useful for layout abstractions using grids).

For example, you'd have something like

#table(
  columns: 2,
  // First section
  table.header(table.cell(colspan: 2)[*Europe*]),
  table.subheader([*Name*], [*Age*]),
  [Peter], [55],
  [Mary], [48],
  table.subheader([*Name*], [*Preference*]),
  [Joseph], [Banana],
  [Jane], [Apple],

  // Second section
  table.header(table.cell(colspan: 2)[*South America*]),
  table.subheader([*Name*], [*Age*]),
  [Pedro], [55],
  [María], [48],
  table.subheader([*Name*], [*Preference*]),
  [José], [Grape juice],
  [Robert], [Strawberry],
)

Which, if broken apart, would generate the following output:

headers and subheaders repeated together

Use Case

Have the flexibility to create table subsections. (The proposed syntax could also be changed to reflect that.)

See ConTeXt's table sections for some inspiration: https://wiki.contextgarden.net/TABLE#Multipage_TABLEs

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or requestlayoutRelated to layout, positioning, etc.modelRelated to structure and semantics.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions