diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-11-17 23:09:23 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-11-17 23:09:23 +0100 |
| commit | 095fa52be5d7ed135f39553359e0253cfea6b71b (patch) | |
| tree | 71e8a71a8b7755b32221a30c32f62cc146acdd33 /tests | |
| parent | e869c899bcaefb19c3c47955577396b85494b823 (diff) | |
Placed node
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/layout/placed.png | bin | 0 -> 31901 bytes | |||
| -rw-r--r-- | tests/typ/layout/move.typ | 2 | ||||
| -rw-r--r-- | tests/typ/layout/placed.typ | 22 |
3 files changed, 23 insertions, 1 deletions
diff --git a/tests/ref/layout/placed.png b/tests/ref/layout/placed.png Binary files differnew file mode 100644 index 00000000..10a0bfd4 --- /dev/null +++ b/tests/ref/layout/placed.png diff --git a/tests/typ/layout/move.typ b/tests/typ/layout/move.typ index c1f97e15..a7cdf368 100644 --- a/tests/typ/layout/move.typ +++ b/tests/typ/layout/move.typ @@ -2,7 +2,7 @@ #let tex = [{ [T] h(-0.14 * size) - move(y: 0.22 * size)[E] + move(dy: 0.22 * size)[E] h(-0.12 * size) [X] }] diff --git a/tests/typ/layout/placed.typ b/tests/typ/layout/placed.typ new file mode 100644 index 00000000..41431dee --- /dev/null +++ b/tests/typ/layout/placed.typ @@ -0,0 +1,22 @@ +#page("a8") +#place(bottom, center)[© Typst] + += Placement +#place(right, image("../../res/tiger.jpg", width: 1.8cm)) +Hi there. This is \ +a placed node. \ +Unfortunately, \ +the line breaks still had to be inserted manually. + +#stack( + rect(fill: eastern, height: 10pt), + place(right, dy: 1.5pt)[ABC], + rect(fill: conifer, height: 10pt, width: 80%), + rect(fill: forest, height: 10pt), +) + +#block[ + #place(center, dx: -7pt, dy: -5pt)[Hello] + #place(center, dx: 7pt, dy: 5pt)[Hello] + Hello #h(1fr) Hello +] |
