summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEric Biedert <github@ericbiedert.de>2023-09-18 14:51:34 +0200
committerGitHub <noreply@github.com>2023-09-18 14:51:34 +0200
commitb10f9ae7b7f5a15c797441d4d67ea69d2ab9b617 (patch)
tree61a2851dbc9656a633b893d0daed1f381465d900 /tests
parente55348dbc090b797a94fe69fc87d45c6de92d97f (diff)
Fix "set align" for block equations (#2157)
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/math/block-alignment.pngbin0 -> 5167 bytes
-rw-r--r--tests/typ/math/block-alignment.typ33
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/ref/math/block-alignment.png b/tests/ref/math/block-alignment.png
new file mode 100644
index 00000000..608cef17
--- /dev/null
+++ b/tests/ref/math/block-alignment.png
Binary files differ
diff --git a/tests/typ/math/block-alignment.typ b/tests/typ/math/block-alignment.typ
new file mode 100644
index 00000000..c6c9cd89
--- /dev/null
+++ b/tests/typ/math/block-alignment.typ
@@ -0,0 +1,33 @@
+// Test alignment of block equations.
+
+---
+// Test unnumbered
+#let eq(alignment) = {
+ show math.equation: set align(alignment)
+ $ a + b = c $
+}
+
+#eq(center)
+#eq(left)
+#eq(right)
+
+#set text(dir: rtl)
+#eq(start)
+#eq(end)
+
+---
+// Test numbered
+#let eq(alignment) = {
+ show math.equation: set align(alignment)
+ $ a + b = c $
+}
+
+#set math.equation(numbering: "(1)")
+
+#eq(center)
+#eq(left)
+#eq(right)
+
+#set text(dir: rtl)
+#eq(start)
+#eq(end)