summaryrefslogtreecommitdiff
path: root/tests/typ/layout/grid-rtl.typ
diff options
context:
space:
mode:
authorPgBiel <9021226+PgBiel@users.noreply.github.com>2024-03-03 16:32:27 -0300
committerGitHub <noreply@github.com>2024-03-03 19:32:27 +0000
commitdecb4fd9b98968dbaa89451ab6620b33819260a5 (patch)
treeea2b5c2dcefe85d9be57f28a3c103605b5178513 /tests/typ/layout/grid-rtl.typ
parent098ef5acbb91723c4c806b23e5e5d85523fc88aa (diff)
Merging cells: Rowspans [More Flexible Tables Pt.3b] (#3501)
Diffstat (limited to 'tests/typ/layout/grid-rtl.typ')
-rw-r--r--tests/typ/layout/grid-rtl.typ41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/typ/layout/grid-rtl.typ b/tests/typ/layout/grid-rtl.typ
index dcac9810..be9fac51 100644
--- a/tests/typ/layout/grid-rtl.typ
+++ b/tests/typ/layout/grid-rtl.typ
@@ -137,3 +137,44 @@
#grid(
[a], grid.vline(position: left)
)
+
+---
+#set text(dir: rtl)
+
+#grid(
+ columns: 4,
+ fill: (x, y) => if calc.odd(x + y) { blue.lighten(50%) } else { blue.lighten(10%) },
+ inset: 5pt,
+ align: center,
+ grid.cell(rowspan: 2, fill: orange)[*Left*],
+ [Right A], [Right A], [Right A],
+ [Right B], grid.cell(colspan: 2, rowspan: 2, fill: orange.darken(10%))[B Wide],
+ [Left A], [Left A],
+ [Left B], [Left B], grid.cell(colspan: 2, rowspan: 3, fill: orange)[Wide and Long]
+)
+
+#table(
+ columns: 4,
+ fill: (x, y) => if calc.odd(x + y) { blue.lighten(50%) } else { blue.lighten(10%) },
+ inset: 5pt,
+ align: center,
+ gutter: 3pt,
+ table.cell(rowspan: 2, fill: orange)[*Left*],
+ [Right A], [Right A], [Right A],
+ [Right B], table.cell(colspan: 2, rowspan: 2, fill: orange.darken(10%))[B Wide],
+ [Left A], [Left A],
+ [Left B], [Left B], table.cell(colspan: 2, rowspan: 3, fill: orange)[Wide and Long]
+)
+
+---
+#set page(height: 10em)
+#set text(dir: rtl)
+#table(
+ columns: 2,
+ rows: (auto, auto, 3em),
+ row-gutter: 1em,
+ fill: red,
+ [a], table.cell(rowspan: 3, block(width: 50%, height: 10em, fill: orange) + place(bottom)[*ZD*]),
+ [e],
+ [f]
+)