diff options
| author | Eric Biedert <github@ericbiedert.de> | 2024-08-15 22:21:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-15 20:21:42 +0000 |
| commit | 4853726e5b55ea5861566e850db3e6260879d9f8 (patch) | |
| tree | 15bfd841340b7f59a8565b3695c017eccba31fe0 /tests | |
| parent | d221a89a40ba504408468d8f427ce8933e332a6f (diff) | |
Add `gap` and `justify` parameters to `repeat` (#4644)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/repeat-gap.png | bin | 0 -> 293 bytes | |||
| -rw-r--r-- | tests/ref/repeat-no-justify-align.png | bin | 0 -> 246 bytes | |||
| -rw-r--r-- | tests/ref/repeat-no-justify.png | bin | 0 -> 246 bytes | |||
| -rw-r--r-- | tests/suite/layout/repeat.typ | 15 |
4 files changed, 15 insertions, 0 deletions
diff --git a/tests/ref/repeat-gap.png b/tests/ref/repeat-gap.png Binary files differnew file mode 100644 index 00000000..40f7f29a --- /dev/null +++ b/tests/ref/repeat-gap.png diff --git a/tests/ref/repeat-no-justify-align.png b/tests/ref/repeat-no-justify-align.png Binary files differnew file mode 100644 index 00000000..1cb79736 --- /dev/null +++ b/tests/ref/repeat-no-justify-align.png diff --git a/tests/ref/repeat-no-justify.png b/tests/ref/repeat-no-justify.png Binary files differnew file mode 100644 index 00000000..820aec09 --- /dev/null +++ b/tests/ref/repeat-no-justify.png diff --git a/tests/suite/layout/repeat.typ b/tests/suite/layout/repeat.typ index 5c82fc19..a46bf6d2 100644 --- a/tests/suite/layout/repeat.typ +++ b/tests/suite/layout/repeat.typ @@ -42,3 +42,18 @@ A#box(width: 1fr, repeat(rect(width: 6em, height: 0.7em)))B // Error: 2:2-2:13 repeat with no size restrictions #set page(width: auto) #repeat(".") + +--- repeat-gap --- +// Test repeat with custom gap. +A#box(width: 1fr, repeat(rect(width: 2em, height: 1em), gap: 1em))B + +--- repeat-no-justify --- +// Test repeat with disabled justification. +#set repeat(justify: false) +A#box(width: 1fr, repeat(rect(width: 2em, height: 1em), gap: 1em))B + +--- repeat-no-justify-align --- +// Test repeat with alignment and disabled justification. +#set repeat(justify: false) +#set align(right) +A#box(width: 1fr, repeat(rect(width: 2em, height: 1em), gap: 1em))B |
