mirror of
https://github.com/typst/typst
synced 2025-05-15 01:25:28 +08:00
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
26 lines
454 B
Typst
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)
|