diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-05-26 11:59:53 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-05-26 11:59:53 +0200 |
| commit | 66d8f4569a9f13270c5f477e0730f127a22333e2 (patch) | |
| tree | ebb60254e69d7f65ec2245aeae3543f6efff0cbb /tests | |
| parent | 99cb655832161d4ebec73273a15453a8f6acc1b7 (diff) | |
Locate me!
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/layout/locate-break.png | bin | 0 -> 122 bytes | |||
| -rw-r--r-- | tests/ref/layout/locate.png | bin | 0 -> 2795 bytes | |||
| -rw-r--r-- | tests/typ/layout/locate-break.typ | 5 | ||||
| -rw-r--r-- | tests/typ/layout/locate.typ | 22 |
4 files changed, 27 insertions, 0 deletions
diff --git a/tests/ref/layout/locate-break.png b/tests/ref/layout/locate-break.png Binary files differnew file mode 100644 index 00000000..25abb4a0 --- /dev/null +++ b/tests/ref/layout/locate-break.png diff --git a/tests/ref/layout/locate.png b/tests/ref/layout/locate.png Binary files differnew file mode 100644 index 00000000..015c5a6d --- /dev/null +++ b/tests/ref/layout/locate.png diff --git a/tests/typ/layout/locate-break.typ b/tests/typ/layout/locate-break.typ new file mode 100644 index 00000000..28631cfa --- /dev/null +++ b/tests/typ/layout/locate-break.typ @@ -0,0 +1,5 @@ +// Test locate with crazy pagebreaks. + +--- +#set page(height: 10pt) +{3 * locate(me => me.page * pagebreak())} diff --git a/tests/typ/layout/locate.typ b/tests/typ/layout/locate.typ new file mode 100644 index 00000000..ec2262c5 --- /dev/null +++ b/tests/typ/layout/locate.typ @@ -0,0 +1,22 @@ +// Test locate me. + +--- +#set page(height: 60pt) +#let pin = locate(me => box({ + let c(length) = str(int(length / 1pt ) ) + square(size: 1.5pt, fill: blue) + h(0.15em) + text(0.5em)[{me.page}, #c(me.x), #c(me.y)] +})) + +#place(rotate(origin: top + left, 25deg, move(dx: 40pt, pin))) + +#pin +#h(10pt) +#box(pin) \ +#pin + +#place(bottom + right, pin) + +#pagebreak() +#align(center + horizon, pin + [\ ] + pin) |
