summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBeiri22 <beier1@hs-mittweida.de>2023-08-30 12:58:16 +0200
committerGitHub <noreply@github.com>2023-08-30 12:58:16 +0200
commite1558268f9b813ca6b789909075603eb8dc22af9 (patch)
treeb368ad36723d69328ae6c519b2d5325096ea07ef /tests
parent3c508737d9592f54aa66a18252c15c01f867df48 (diff)
Introduce second variant of Ignorant Behaviour and prevent weak page breaks at basically empty pages (#1929)
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/layout/pagebreak-empty.pngbin0 -> 18958 bytes
-rw-r--r--tests/typ/layout/pagebreak-empty.typ30
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/ref/layout/pagebreak-empty.png b/tests/ref/layout/pagebreak-empty.png
new file mode 100644
index 00000000..412c4e8d
--- /dev/null
+++ b/tests/ref/layout/pagebreak-empty.png
Binary files differ
diff --git a/tests/typ/layout/pagebreak-empty.typ b/tests/typ/layout/pagebreak-empty.typ
new file mode 100644
index 00000000..c228959e
--- /dev/null
+++ b/tests/typ/layout/pagebreak-empty.typ
@@ -0,0 +1,30 @@
+// Test page breaks on basically empty pages.
+
+---
+// After place
+// Should result in three pages.
+First
+#pagebreak(weak: true)
+#place(right)[placed A]
+#pagebreak(weak: true)
+Third
+
+---
+// After only ignorables & invisibles
+// Should result in two pages.
+First
+#pagebreak(weak: true)
+#counter(page).update(1)
+#metadata("Some")
+#pagebreak(weak: true)
+Second
+
+---
+// After only ignorables, but regular break
+// Should result in three pages.
+First
+#pagebreak()
+#counter(page).update(1)
+#metadata("Some")
+#pagebreak()
+Third