summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEric Biedert <github@ericbiedert.de>2024-08-26 17:26:50 +0200
committerGitHub <noreply@github.com>2024-08-26 15:26:50 +0000
commit326fd3380151551538d6f245f884d174551bdf0f (patch)
tree4c7e221381bb08cbf01652a2997416aa07a727d3 /tests
parentd926e8c17d756442048460ecf7ba7c867e6b6923 (diff)
Don't number empty regions of broken block equations (#4836)
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/issue-4829-math-pagebreaking-wrong-number.pngbin0 -> 394 bytes
-rw-r--r--tests/ref/math-equation-number-empty.pngbin0 -> 116 bytes
-rw-r--r--tests/suite/math/equation.typ4
-rw-r--r--tests/suite/math/multiline.typ12
4 files changed, 16 insertions, 0 deletions
diff --git a/tests/ref/issue-4829-math-pagebreaking-wrong-number.png b/tests/ref/issue-4829-math-pagebreaking-wrong-number.png
new file mode 100644
index 00000000..1db8a511
--- /dev/null
+++ b/tests/ref/issue-4829-math-pagebreaking-wrong-number.png
Binary files differ
diff --git a/tests/ref/math-equation-number-empty.png b/tests/ref/math-equation-number-empty.png
new file mode 100644
index 00000000..9311f114
--- /dev/null
+++ b/tests/ref/math-equation-number-empty.png
Binary files differ
diff --git a/tests/suite/math/equation.typ b/tests/suite/math/equation.typ
index 2345de54..6cdf7b7e 100644
--- a/tests/suite/math/equation.typ
+++ b/tests/suite/math/equation.typ
@@ -256,6 +256,10 @@ $ q &= sum_k ln A \
],
)
+--- math-equation-number-empty ---
+// Test numbering on empty equations.
+#math.equation(numbering: "1", block: true, [])
+
--- issue-4187-alignment-point-affects-row-height ---
// In this bug, a row of "-" only should have a very small height; but
// after adding an alignment point "&", the row gains a larger height.
diff --git a/tests/suite/math/multiline.typ b/tests/suite/math/multiline.typ
index 35f10ea4..b6d970f3 100644
--- a/tests/suite/math/multiline.typ
+++ b/tests/suite/math/multiline.typ
@@ -133,3 +133,15 @@ $ a &+ b + & c \
--- issue-1948-math-text-break ---
// Test text with linebreaks in math.
$ x := "a\nb\nc\nd\ne" $
+
+
+--- issue-4829-math-pagebreaking-wrong-number ---
+// Test numbering of empty regions of broken equations.
+#set page(height: 5em)
+#set math.equation(numbering: "1")
+#show math.equation: set block(breakable: true)
+
+#rect(height: 1.5em)
+
+$ a + b \
+ a + b $