-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
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:
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