typst/tests/typ/layout/page-number-align.typ
Laurenz b76e8d5db9 Interpret vertical page number alignment differently
The vertical alignment of `number-align` now selects header or footer instead of aligning within the footer. This is a minor breaking change because
- top behaves differently now
- horizon is now forbidden
- bottom (the new default) behaves differently, too
Typical number-align usage will likely not use the vertical component at all, though.

Fixes #645
2023-09-06 10:32:54 +02:00

26 lines
454 B
Typst

// Test page number alignment.
---
#set page(
height: 100pt,
margin: 30pt,
numbering: "(1)",
number-align: top + right,
)
#block(width: 100%, height: 100%, fill: aqua.lighten(50%))
---
#set page(
height: 100pt,
margin: 30pt,
numbering: "[1]",
number-align: bottom + left,
)
#block(width: 100%, height: 100%, fill: aqua.lighten(50%))
---
// Error: 25-39 page number cannot be `horizon`-aligned
#set page(number-align: left + horizon)