From ed0c80401782a6c42173f0bb123731b798a2cfe1 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 27 Sep 2021 15:11:56 +0200 Subject: 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 --- tests/typ/layout/stack.typ | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests/typ') 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), -- cgit v1.2.3