summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMax <me@mkor.je>2024-09-26 14:30:47 +0000
committerGitHub <noreply@github.com>2024-09-26 14:30:47 +0000
commita40e068590895562f0d1a4aa17fe97b9bf5630a3 (patch)
treee4d5ca3264d056b7b8fc172492de921abbaeef07 /tests
parentcf35c2f44c6fdd8d6ef6f5df81f144db7355286d (diff)
Add alignment parameter to matrices and vectors (#4998)
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/math-mat-align-explicit-alternating.png (renamed from tests/ref/math-mat-align-explicit--alternating.png)bin1009 -> 1009 bytes
-rw-r--r--tests/ref/math-mat-align-explicit-mixed.pngbin0 -> 2523 bytes
-rw-r--r--tests/ref/math-mat-align.pngbin0 -> 1564 bytes
-rw-r--r--tests/ref/math-vec-align.pngbin0 -> 1098 bytes
-rw-r--r--tests/suite/math/mat.typ18
-rw-r--r--tests/suite/math/vec.typ4
6 files changed, 21 insertions, 1 deletions
diff --git a/tests/ref/math-mat-align-explicit--alternating.png b/tests/ref/math-mat-align-explicit-alternating.png
index 37e8dc06..37e8dc06 100644
--- a/tests/ref/math-mat-align-explicit--alternating.png
+++ b/tests/ref/math-mat-align-explicit-alternating.png
Binary files differ
diff --git a/tests/ref/math-mat-align-explicit-mixed.png b/tests/ref/math-mat-align-explicit-mixed.png
new file mode 100644
index 00000000..88ccd6de
--- /dev/null
+++ b/tests/ref/math-mat-align-explicit-mixed.png
Binary files differ
diff --git a/tests/ref/math-mat-align.png b/tests/ref/math-mat-align.png
new file mode 100644
index 00000000..66513dd5
--- /dev/null
+++ b/tests/ref/math-mat-align.png
Binary files differ
diff --git a/tests/ref/math-vec-align.png b/tests/ref/math-vec-align.png
new file mode 100644
index 00000000..680d0936
--- /dev/null
+++ b/tests/ref/math-vec-align.png
Binary files differ
diff --git a/tests/suite/math/mat.typ b/tests/suite/math/mat.typ
index 1f6716d7..baec53ee 100644
--- a/tests/suite/math/mat.typ
+++ b/tests/suite/math/mat.typ
@@ -92,7 +92,12 @@ $ mat(1, 0, 0, 0; 0, 1, 0, 0; 0, 0, 1, 1) $
// Error: 3-37 cannot draw a vertical line after column 3 of a matrix with 3 columns
$ mat(1, 0, 0; 0, 1, 1; augment: #3) $,
---- math-mat-align-explicit--alternating ---
+--- math-mat-align ---
+$ mat(-1, 1, 1; 1, -1, 1; 1, 1, -1; align: #left) $
+$ mat(-1, 1, 1; 1, -1, 1; 1, 1, -1; align: #center) $
+$ mat(-1, 1, 1; 1, -1, 1; 1, 1, -1; align: #right) $
+
+--- math-mat-align-explicit-alternating ---
// Test alternating explicit alignment in a matrix.
$ mat(
"a" & "a a a" & "a a";
@@ -124,6 +129,17 @@ $ mat(
"a a a"&, "a"&, "a a a"&;
) $
+--- math-mat-align-explicit-mixed ---
+// Test explicit alignment in some columns with align parameter in a matrix.
+#let data = (
+ ($&18&&.02$, $1$, $+1$),
+ ($-&9&&.3$, $-1$, $-&21$),
+ ($&&&.011$, $1$, $&0$)
+)
+$ #math.mat(align: left, ..data) $
+$ #math.mat(align: center, ..data) $
+$ #math.mat(align: right, ..data) $
+
--- math-mat-align-complex ---
// Test #460 equations.
#let stop = {
diff --git a/tests/suite/math/vec.typ b/tests/suite/math/vec.typ
index d7bc0b6c..cf7057f3 100644
--- a/tests/suite/math/vec.typ
+++ b/tests/suite/math/vec.typ
@@ -4,6 +4,10 @@
#set math.vec(gap: 1em)
$ vec(1, 2) $
+--- math-vec-align ---
+$ vec(-1, 1, -1, align: #left)
+ vec(-1, 1, -1, align: #center)
+ vec(-1, 1, -1, align: #right) $
--- math-vec-align-explicit-alternating ---
// Test alternating alignment in a vector.