diff --git a/tests/ref/grid-subfooters-basic-non-consecutive-with-header.png b/tests/ref/grid-subfooters-basic-non-consecutive-with-header.png new file mode 100644 index 000000000..6f2a57beb Binary files /dev/null and b/tests/ref/grid-subfooters-basic-non-consecutive-with-header.png differ diff --git a/tests/ref/grid-subfooters-basic-non-consecutive.png b/tests/ref/grid-subfooters-basic-non-consecutive.png new file mode 100644 index 000000000..81d0c42de Binary files /dev/null and b/tests/ref/grid-subfooters-basic-non-consecutive.png differ diff --git a/tests/ref/grid-subfooters-basic-replace.png b/tests/ref/grid-subfooters-basic-replace.png new file mode 100644 index 000000000..cd73d3e9a Binary files /dev/null and b/tests/ref/grid-subfooters-basic-replace.png differ diff --git a/tests/ref/grid-subfooters-basic-with-header.png b/tests/ref/grid-subfooters-basic-with-header.png new file mode 100644 index 000000000..521656146 Binary files /dev/null and b/tests/ref/grid-subfooters-basic-with-header.png differ diff --git a/tests/ref/grid-subfooters-basic.png b/tests/ref/grid-subfooters-basic.png new file mode 100644 index 000000000..5a6468075 Binary files /dev/null and b/tests/ref/grid-subfooters-basic.png differ diff --git a/tests/ref/grid-subfooters-repeat-gutter.png b/tests/ref/grid-subfooters-repeat-gutter.png new file mode 100644 index 000000000..35842b582 Binary files /dev/null and b/tests/ref/grid-subfooters-repeat-gutter.png differ diff --git a/tests/ref/grid-subfooters-repeat-non-consecutive.png b/tests/ref/grid-subfooters-repeat-non-consecutive.png new file mode 100644 index 000000000..02f572f31 Binary files /dev/null and b/tests/ref/grid-subfooters-repeat-non-consecutive.png differ diff --git a/tests/ref/grid-subfooters-repeat-replace-double-widow.png b/tests/ref/grid-subfooters-repeat-replace-double-widow.png new file mode 100644 index 000000000..86d92a832 Binary files /dev/null and b/tests/ref/grid-subfooters-repeat-replace-double-widow.png differ diff --git a/tests/ref/grid-subfooters-repeat-replace-gutter.png b/tests/ref/grid-subfooters-repeat-replace-gutter.png new file mode 100644 index 000000000..2ca221533 Binary files /dev/null and b/tests/ref/grid-subfooters-repeat-replace-gutter.png differ diff --git a/tests/ref/grid-subfooters-repeat-replace-widow.png b/tests/ref/grid-subfooters-repeat-replace-widow.png new file mode 100644 index 000000000..35633b0a4 Binary files /dev/null and b/tests/ref/grid-subfooters-repeat-replace-widow.png differ diff --git a/tests/ref/grid-subfooters-repeat-replace.png b/tests/ref/grid-subfooters-repeat-replace.png new file mode 100644 index 000000000..0d7803b85 Binary files /dev/null and b/tests/ref/grid-subfooters-repeat-replace.png differ diff --git a/tests/ref/grid-subfooters-repeat-with-header.png b/tests/ref/grid-subfooters-repeat-with-header.png new file mode 100644 index 000000000..d2a80ff33 Binary files /dev/null and b/tests/ref/grid-subfooters-repeat-with-header.png differ diff --git a/tests/ref/grid-subfooters-repeat.png b/tests/ref/grid-subfooters-repeat.png new file mode 100644 index 000000000..e8b431fd3 Binary files /dev/null and b/tests/ref/grid-subfooters-repeat.png differ diff --git a/tests/suite/layout/grid/subfooters.typ b/tests/suite/layout/grid/subfooters.typ index 1e4c1a017..dbd9ced4a 100644 --- a/tests/suite/layout/grid/subfooters.typ +++ b/tests/suite/layout/grid/subfooters.typ @@ -22,6 +22,7 @@ [*Mode*], [2025], table.cell(colspan: 2)[*Totals*], ), + // TODO: Why does it overflow here? table.header( level: 2, table.cell(colspan: 2)[*United States*], @@ -39,3 +40,143 @@ table.cell(colspan: 2)[*Data Inc.*], ), ) + +--- grid-subfooters-basic --- +#grid( + [a], + grid.footer(level: 2, [b]), + grid.footer([c]), +) + +--- grid-subfooters-basic-non-consecutive --- +#grid( + [x], + grid.footer(level: 2, [a]), + [y], + grid.footer([b]), +) + +--- grid-subfooters-basic-replace --- +#grid( + [x], + grid.footer(level: 2, [a]), + [y], + grid.footer(level: 2, [b]), + [z], + grid.footer([c]), +) + +--- grid-subfooters-basic-with-header --- +#grid( + grid.header([a]), + [b], + grid.footer(level: 2, [c]), + grid.footer([d]), +) + +--- grid-subfooters-basic-non-consecutive-with-header --- +#grid( + grid.header([a]), + [x], + grid.footer(level: 2, [b]), + [y], + grid.footer([f]) +) + +--- grid-subfooters-repeat --- +#set page(height: 8em) +#grid( + ..([a],) * 10, + grid.footer(level: 2, [b]), + grid.footer([c]), +) + +--- grid-subfooters-repeat-non-consecutive --- +#set page(height: 8em) +#grid( + ..([y],) * 10, + grid.footer(level: 2, [b]), + [x], + grid.footer([a]), +) + +--- grid-subfooters-repeat-with-header --- +#set page(height: 8em) +#grid( + grid.header([a]), + ..([b],) * 10, + grid.footer(level: 2, [c]), + [m], + grid.footer([f]) +) + +--- grid-subfooters-repeat-gutter --- +// Gutter above the footer is also repeated +#set page(height: 8em) +#grid( + inset: (top: 0.5pt), + stroke: (top: 1pt), + gutter: (1pt,) * 9 + (6pt, 1pt), + ..([a],) * 10, + grid.footer(level: 2, [b]), + grid.footer([c]), +) + +--- grid-subfooters-repeat-replace --- +#set page(height: 8em) +#grid( + ..([x],) * 10, + grid.footer(level: 2, [a]), + ..([y],) * 10, + grid.footer(level: 2, [b]), + [z], + grid.footer([c]), +) + +--- grid-subfooters-repeat-replace-multiple-levels --- +// TODO: This is overflowing +#set page(height: 8em) +#grid( + ..([x],) * 6, + grid.footer(level: 2, [a]), + ..([y],) * 10, + grid.footer(level: 3, [b]), + grid.footer(level: 2, [c]), + [z], + grid.footer([d]), +) + +--- grid-subfooters-repeat-replace-gutter --- +#set page(height: 8em) +#grid( + gutter: 3pt, + ..([x],) * 3, + grid.footer(level: 2, [a]), + ..([y],) * 8, + grid.footer(level: 2, [b]), + [z], + grid.footer([c]), +) + +--- grid-subfooters-repeat-replace-widow --- +#set page(height: 8em) +#grid( + ..([x],) * 14, + grid.footer(level: 2, [a]), + ..([y],) * 8, + grid.footer(level: 2, [b]), + [z], + grid.footer([c]), +) + +--- grid-subfooters-repeat-replace-double-widow --- +#set page(height: 8em) +#grid( + ..([x],) * 12, + grid.footer(level: 3, [a]), + grid.footer(level: 2, [b]), + ..([y],) * 11, + grid.footer(level: 2, [c]), + [z], + grid.footer([d]), +)