summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-09-27 15:11:56 +0200
committerLaurenz <laurmaedje@gmail.com>2021-09-27 22:23:26 +0200
commited0c80401782a6c42173f0bb123731b798a2cfe1 (patch)
treeb2069f302a2d4474a23cd69a5f0ab50ab5311643 /tests/typ
parente10b3d838a75ea351f8477e07f2e1e647f4539dc (diff)
Add spacing capabilities to stack function
- Named argument `spacing` controls spacing between any two template arguments - Arbitrary linears in the list can produce arbitrary spacing
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/layout/stack.typ12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/typ/layout/stack.typ b/tests/typ/layout/stack.typ
index 384f574f..aee66d6a 100644
--- a/tests/typ/layout/stack.typ
+++ b/tests/typ/layout/stack.typ
@@ -24,7 +24,17 @@
#stack(dir: ltr, ..items)
---
-// Test overflowing stack.
+// Test spacing.
+#page(width: 50pt, margins: 0pt)
+#par(spacing: 5pt)
+
+#let x = square(length: 10pt, fill: eastern)
+#stack(dir: rtl, spacing: 5pt, x, x, x)
+#stack(dir: ltr, x, 20%, x, 20%, x)
+#stack(dir: ltr, spacing: 5pt, x, x, 7pt, 3pt, x)
+
+---
+// Test overflow.
#page(width: 50pt, height: 30pt, margins: 0pt)
#box(stack(
rect(width: 40pt, height: 20pt, fill: conifer),