diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-02 15:47:25 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-02 15:47:25 +0100 |
| commit | 56923ee472f1eaa67d3543e19372823139205885 (patch) | |
| tree | accd9e05fb5875457967c5b456626767ff3e9c9e /tests/typ | |
| parent | 9bc90c371fb41a2d6dc08eb4673e5be15f829514 (diff) | |
Multi-part numbering patterns
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/basics/enum.typ | 4 | ||||
| -rw-r--r-- | tests/typ/compute/utility.typ | 15 |
2 files changed, 12 insertions, 7 deletions
diff --git a/tests/typ/basics/enum.typ b/tests/typ/basics/enum.typ index d4c30385..0c62a2de 100644 --- a/tests/typ/basics/enum.typ +++ b/tests/typ/basics/enum.typ @@ -12,7 +12,7 @@ --- // Test automatic numbering in summed content. #for i in range(5) { - [+ #numbering(1 + i, "I")] + [+ #numbering("I", 1 + i)] } --- @@ -42,7 +42,7 @@ start: 4, spacing: 0.65em - 3pt, tight: false, - label: n => text(fill: (red, green, blue)(mod(n, 3)), numbering(n, "A")), + label: n => text(fill: (red, green, blue)(mod(n, 3)), numbering("A", n)), [Red], [Green], [Blue], ) diff --git a/tests/typ/compute/utility.typ b/tests/typ/compute/utility.typ index f042c769..cfc2e8af 100644 --- a/tests/typ/compute/utility.typ +++ b/tests/typ/compute/utility.typ @@ -32,13 +32,18 @@ #lorem() --- -#for i in range(9) { - numbering(i, "* and ") - numbering(i, "I") +#for i in range(1, 9) { + numbering("*", i) + [ and ] + numbering("I.a", i, i) [ for #i] parbreak() } --- -// Error: 12-14 must be at least zero -#numbering(-1, "1") +// Error: 17-18 must be positive +#numbering("1", 0) + +--- +// Error: 17-19 must be positive +#numbering("1", -1) |
