summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEric Biedert <github@ericbiedert.de>2024-07-06 15:45:19 +0200
committerGitHub <noreply@github.com>2024-07-06 13:45:19 +0000
commit59374f737079472aa5694b69ebced8c4cd5f9dfc (patch)
treeab6eef10be4a3eab75fee9a1f560ea0179ce09b1 /tests
parent394ba50fa612c36d7443094e21430aed6f533149 (diff)
Avoid spaces around ignorant and invisible elements in math (#4348)
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/math-spacing-ignorant.pngbin0 -> 686 bytes
-rw-r--r--tests/suite/math/spacing.typ10
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/ref/math-spacing-ignorant.png b/tests/ref/math-spacing-ignorant.png
new file mode 100644
index 00000000..6fead62e
--- /dev/null
+++ b/tests/ref/math-spacing-ignorant.png
Binary files differ
diff --git a/tests/suite/math/spacing.typ b/tests/suite/math/spacing.typ
index 2a387f92..707c09bb 100644
--- a/tests/suite/math/spacing.typ
+++ b/tests/suite/math/spacing.typ
@@ -49,6 +49,16 @@ $integral f(x) thin dif x$,
// Both are weak, collide
$integral f(x) #h(0.166em, weak: true)dif x$
+--- math-spacing-ignorant ---
+// Test spacing with ignorant elements
+$#metadata(none) "text"$ \
+$#place(dx: 5em)[Placed] "text"$ \
+// Operator spacing
+$#counter("test").update(3) + b$ \
+$#place(dx: 5em)[a] + b$
+// Validate that ignorant elements are layouted
+#context test(counter("test").get(), (3,))
+
--- issue-1052-math-number-spacing ---
// Test spacing after numbers in math.
$