summaryrefslogtreecommitdiff
path: root/tests/typ/layout
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-17 11:32:15 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-17 11:45:57 +0100
commit312197b276748e1a17258ad21837850f582a467c (patch)
tree3fd0c078a2673a98b74bc12b4d654a4c143b4e1f /tests/typ/layout
parente8435df5ec718e8ecc8a2ad48e4eb3ddd1f92a72 (diff)
Counters
Diffstat (limited to 'tests/typ/layout')
-rw-r--r--tests/typ/layout/page-marginals.typ10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/typ/layout/page-marginals.typ b/tests/typ/layout/page-marginals.typ
index 30bd39c1..d8ce9b79 100644
--- a/tests/typ/layout/page-marginals.typ
+++ b/tests/typ/layout/page-marginals.typ
@@ -1,15 +1,15 @@
#set page(
paper: "a8",
margin: (x: 15pt, y: 30pt),
- header: align(horizon, {
+ header: {
text(eastern)[*Typst*]
h(1fr)
text(0.8em)[_Chapter 1_]
- }),
- footer: page => v(5pt) + align(center)[\~ #page \~],
- background: n => if n <= 2 {
+ },
+ footer: align(center)[\~ #counter(page).get() \~],
+ background: counter(page).get(n => if n <= 2 {
place(center + horizon, circle(radius: 1cm, fill: luma(90%)))
- }
+ })
)
But, soft! what light through yonder window breaks? It is the east, and Juliet