summaryrefslogtreecommitdiff
path: root/tests/typ/math
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ/math')
-rw-r--r--tests/typ/math/alignment.typ60
-rw-r--r--tests/typ/math/matrix-alignment.typ55
2 files changed, 55 insertions, 60 deletions
diff --git a/tests/typ/math/alignment.typ b/tests/typ/math/alignment.typ
index 70c52d37..8f12971f 100644
--- a/tests/typ/math/alignment.typ
+++ b/tests/typ/math/alignment.typ
@@ -26,68 +26,8 @@ $
$
---
-// Test alternating alignment.
-$
-"a" & "a a a" & "a a" \
-"a a" & "a a" & "a" \
-"a a a" & "a" & "a a a" \
-$
-
----
-// Test alternating alignment in a vector.
-$ vec(
- "a" & "a a a" & "a a",
- "a a" & "a a" & "a",
- "a a a" & "a" & "a a a",
-) $
-
----
-// Test alternating explicit alignment in a matrix.
-$ mat(
- "a" & "a a a" & "a a";
- "a a" & "a a" & "a";
- "a a a" & "a" & "a a a";
-) $
-
----
-// Test alignment in a matrix.
-$ mat(
- "a", "a a a", "a a";
- "a a", "a a", "a";
- "a a a", "a", "a a a";
-) $
-
----
-// Test explicit left alignment in a matrix.
-$ mat(
- &"a", &"a a a", &"a a";
- &"a a", &"a a", &"a";
- &"a a a", &"a", &"a a a";
-) $
-
----
-// Test explicit right alignment in a matrix.
-$ mat(
- "a"&, "a a a"&, "a a"&;
- "a a"&, "a a"&, "a"&;
- "a a a"&, "a"&, "a a a"&;
-) $
-
----
// Test #460 equations.
$
a &=b & quad c&=d \
e &=f & g&=h
$
-
-$ mat(&a+b,c;&d, e) $
-$ mat(&a+b&,c;&d&, e) $
-$ mat(&&&a+b,c;&&&d, e) $
-$ mat(.&a+b&.,c;.....&d&....., e) $
-
----
-// Test #454 equations.
-$ mat(-1, 1, 1; 1, -1, 1; 1, 1, -1) $
-$ mat(-1&, 1&, 1&; 1&, -1&, 1&; 1&, 1&, -1&) $
-$ mat(-1&, 1&, 1&; 1, -1, 1; 1, 1, -1) $
-$ mat(&-1, &1, &1; 1, -1, 1; 1, 1, -1) $
diff --git a/tests/typ/math/matrix-alignment.typ b/tests/typ/math/matrix-alignment.typ
new file mode 100644
index 00000000..fd149dd8
--- /dev/null
+++ b/tests/typ/math/matrix-alignment.typ
@@ -0,0 +1,55 @@
+// Test matrix alignment math.
+
+---
+// Test alternating alignment in a vector.
+$ vec(
+ "a" & "a a a" & "a a",
+ "a a" & "a a" & "a",
+ "a a a" & "a" & "a a a",
+) $
+
+---
+// Test alternating explicit alignment in a matrix.
+$ mat(
+ "a" & "a a a" & "a a";
+ "a a" & "a a" & "a";
+ "a a a" & "a" & "a a a";
+) $
+
+---
+// Test alignment in a matrix.
+$ mat(
+ "a", "a a a", "a a";
+ "a a", "a a", "a";
+ "a a a", "a", "a a a";
+) $
+
+---
+// Test explicit left alignment in a matrix.
+$ mat(
+ &"a", &"a a a", &"a a";
+ &"a a", &"a a", &"a";
+ &"a a a", &"a", &"a a a";
+) $
+
+---
+// Test explicit right alignment in a matrix.
+$ mat(
+ "a"&, "a a a"&, "a a"&;
+ "a a"&, "a a"&, "a"&;
+ "a a a"&, "a"&, "a a a"&;
+) $
+
+---
+// Test #460 equations.
+$ mat(&a+b,c;&d, e) $
+$ mat(&a+b&,c;&d&, e) $
+$ mat(&&&a+b,c;&&&d, e) $
+$ mat(.&a+b&.,c;.....&d&....., e) $
+
+---
+// Test #454 equations.
+$ mat(-1, 1, 1; 1, -1, 1; 1, 1, -1) $
+$ mat(-1&, 1&, 1&; 1&, -1&, 1&; 1&, 1&, -1&) $
+$ mat(-1&, 1&, 1&; 1, -1, 1; 1, 1, -1) $
+$ mat(&-1, &1, &1; 1, -1, 1; 1, 1, -1) $