summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-09-06 10:30:45 +0200
committerLaurenz <laurmaedje@gmail.com>2023-09-06 10:32:54 +0200
commitb76e8d5db9bea8fb63e65fe7a54db6bbae1cf842 (patch)
tree2ccd7f3185b52b44f83f9ed23c1bbc3319e0804a /tests
parent87c0a5171af2e374cd6b0a0bd6d8d9531aaf796c (diff)
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
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/layout/page-number-align.pngbin0 -> 1343 bytes
-rw-r--r--tests/typ/layout/page-number-align.typ25
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/ref/layout/page-number-align.png b/tests/ref/layout/page-number-align.png
new file mode 100644
index 00000000..b05ca454
--- /dev/null
+++ b/tests/ref/layout/page-number-align.png
Binary files differ
diff --git a/tests/typ/layout/page-number-align.typ b/tests/typ/layout/page-number-align.typ
new file mode 100644
index 00000000..0e9b2bc9
--- /dev/null
+++ b/tests/typ/layout/page-number-align.typ
@@ -0,0 +1,25 @@
+// 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)