diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/layout/placed.png | bin | 31901 -> 33917 bytes | |||
| -rw-r--r-- | tests/ref/layout/spacing.png | bin | 1827 -> 2412 bytes | |||
| -rw-r--r-- | tests/typ/layout/placed.typ | 13 | ||||
| -rw-r--r-- | tests/typ/layout/spacing.typ | 7 |
4 files changed, 20 insertions, 0 deletions
diff --git a/tests/ref/layout/placed.png b/tests/ref/layout/placed.png Binary files differindex 10a0bfd4..4fdb1f70 100644 --- a/tests/ref/layout/placed.png +++ b/tests/ref/layout/placed.png diff --git a/tests/ref/layout/spacing.png b/tests/ref/layout/spacing.png Binary files differindex c653df6d..6c7a4e63 100644 --- a/tests/ref/layout/spacing.png +++ b/tests/ref/layout/spacing.png diff --git a/tests/typ/layout/placed.typ b/tests/typ/layout/placed.typ index 334ff80d..017cdc20 100644 --- a/tests/typ/layout/placed.typ +++ b/tests/typ/layout/placed.typ @@ -1,3 +1,6 @@ +// Test the `place` function. + +--- #page("a8") #place(bottom + center)[© Typst] @@ -20,3 +23,13 @@ the line breaks still had to be inserted manually. #place(center, dx: 7pt, dy: 5pt)[Hello] Hello #h(1fr) Hello ] + +--- +// Test how the placed node interacts with paragraph spacing around it. +#page("a8", height: 60pt) + +First + +#place(bottom + right)[Placed] + +Second diff --git a/tests/typ/layout/spacing.typ b/tests/typ/layout/spacing.typ index 7cf6760f..78b778c5 100644 --- a/tests/typ/layout/spacing.typ +++ b/tests/typ/layout/spacing.typ @@ -18,6 +18,13 @@ Add #h(10pt) #h(10pt) up | #h(1fr) | #h(2fr) | #h(1fr) | --- +// Test that spacing has style properties. + +A[#par(align: right)#h(1cm)]B +[#page(height: 20pt)#v(1cm)] +B + +--- // Missing spacing. // Error: 11-13 missing argument: spacing Totally #h() ignored |
