diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-09-27 15:11:56 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-09-27 22:23:26 +0200 |
| commit | ed0c80401782a6c42173f0bb123731b798a2cfe1 (patch) | |
| tree | b2069f302a2d4474a23cd69a5f0ab50ab5311643 /tests | |
| parent | e10b3d838a75ea351f8477e07f2e1e647f4539dc (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')
| -rw-r--r-- | tests/ref/layout/stack.png | bin | 318 -> 371 bytes | |||
| -rw-r--r-- | tests/typ/layout/stack.typ | 12 |
2 files changed, 11 insertions, 1 deletions
diff --git a/tests/ref/layout/stack.png b/tests/ref/layout/stack.png Binary files differindex bc0eb48b..13438d07 100644 --- a/tests/ref/layout/stack.png +++ b/tests/ref/layout/stack.png 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), |
