summaryrefslogtreecommitdiff
path: root/tests/typ/layout/grid-headers-3.typ
diff options
context:
space:
mode:
authorPgBiel <9021226+PgBiel@users.noreply.github.com>2024-03-06 05:41:16 -0300
committerGitHub <noreply@github.com>2024-03-06 08:41:16 +0000
commit898367f096fef507488438e00caae8c4ea1d0ff4 (patch)
treedf1911b8ed79fac943e3b4edcc54feb80a94bf90 /tests/typ/layout/grid-headers-3.typ
parent5b2ffd9dd0612d391326e2dd5b5a4a026dec80eb (diff)
Repeatable Table Headers [More Flexible Tables Pt.5a] (#3545)
Diffstat (limited to 'tests/typ/layout/grid-headers-3.typ')
-rw-r--r--tests/typ/layout/grid-headers-3.typ35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/typ/layout/grid-headers-3.typ b/tests/typ/layout/grid-headers-3.typ
new file mode 100644
index 00000000..e7437cf7
--- /dev/null
+++ b/tests/typ/layout/grid-headers-3.typ
@@ -0,0 +1,35 @@
+// Test lack of space for header + text.
+#set page(height: 9em)
+
+#table(
+ rows: (auto, 2.5em, auto, auto, 10em),
+ gutter: 3pt,
+ table.header(
+ [*Hello*],
+ [*World*]
+ ),
+ table.cell(rowspan: 3, lorem(80))
+)
+
+---
+// Orphan header prevention test
+#set page(height: 12em)
+#v(8em)
+#grid(
+ columns: 3,
+ grid.header(
+ [*Mui*], [*A*], grid.cell(rowspan: 2, fill: orange)[*B*],
+ [*Header*], [*Header* #v(0.1em)]
+ ),
+ ..([Test], [Test], [Test]) * 20
+)
+
+---
+// Empty header should just be a repeated blank row
+#set page(height: 12em)
+#table(
+ columns: 4,
+ align: center + horizon,
+ table.header(),
+ ..range(0, 4).map(i => ([John \##i], table.cell(stroke: green)[123], table.cell(stroke: blue)[456], [789])).flatten()
+)