diff options
| author | Max <me@mkor.je> | 2024-09-26 14:30:47 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-26 14:30:47 +0000 |
| commit | a40e068590895562f0d1a4aa17fe97b9bf5630a3 (patch) | |
| tree | e4d5ca3264d056b7b8fc172492de921abbaeef07 /tests | |
| parent | cf35c2f44c6fdd8d6ef6f5df81f144db7355286d (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) | bin | 1009 -> 1009 bytes | |||
| -rw-r--r-- | tests/ref/math-mat-align-explicit-mixed.png | bin | 0 -> 2523 bytes | |||
| -rw-r--r-- | tests/ref/math-mat-align.png | bin | 0 -> 1564 bytes | |||
| -rw-r--r-- | tests/ref/math-vec-align.png | bin | 0 -> 1098 bytes | |||
| -rw-r--r-- | tests/suite/math/mat.typ | 18 | ||||
| -rw-r--r-- | tests/suite/math/vec.typ | 4 |
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 Binary files differindex 37e8dc06..37e8dc06 100644 --- a/tests/ref/math-mat-align-explicit--alternating.png +++ b/tests/ref/math-mat-align-explicit-alternating.png diff --git a/tests/ref/math-mat-align-explicit-mixed.png b/tests/ref/math-mat-align-explicit-mixed.png Binary files differnew file mode 100644 index 00000000..88ccd6de --- /dev/null +++ b/tests/ref/math-mat-align-explicit-mixed.png diff --git a/tests/ref/math-mat-align.png b/tests/ref/math-mat-align.png Binary files differnew file mode 100644 index 00000000..66513dd5 --- /dev/null +++ b/tests/ref/math-mat-align.png diff --git a/tests/ref/math-vec-align.png b/tests/ref/math-vec-align.png Binary files differnew file mode 100644 index 00000000..680d0936 --- /dev/null +++ b/tests/ref/math-vec-align.png 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. |
