diff options
| author | lolstork <137357423+lolstork@users.noreply.github.com> | 2023-08-25 02:16:03 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-25 11:16:03 +0200 |
| commit | c00fc14905380da2f3eb6ab9bbb366c096c6a6a2 (patch) | |
| tree | ac4250987074400795fb539c10dd7ee4c7ae5f0f /tests | |
| parent | a8d3ab3fb0f65f733695ed03a2869726a98cffd7 (diff) | |
Initial support for augmented matrices (#1679)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/math/matrix.png | bin | 25858 -> 40018 bytes | |||
| -rw-r--r-- | tests/typ/math/matrix.typ | 28 |
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/ref/math/matrix.png b/tests/ref/math/matrix.png Binary files differindex a14758f7..530c2b5a 100644 --- a/tests/ref/math/matrix.png +++ b/tests/ref/math/matrix.png diff --git a/tests/typ/math/matrix.typ b/tests/typ/math/matrix.typ index f65004a7..efcde1eb 100644 --- a/tests/typ/math/matrix.typ +++ b/tests/typ/math/matrix.typ @@ -63,3 +63,31 @@ $ mat(B, A B) $ $ mat(B, A B, dots) $ $ mat(B, A B, dots;) $ $ mat(#1, #(foo: "bar")) $ + +--- + +// Test matrix line drawing (augmentation). +#grid( + columns: 2, + gutter: 10pt, + + $ mat(10, 2, 3, 4; 5, 6, 7, 8; augment: #3) $, + $ mat(100, 2, 3; 4, 5, 6; 7, 8, 9; augment: #(hline: 2)) $, + $ mat(100, 2, 3; 4, 5, 6; 7, 8, 9; augment: #(hline: 1, vline: 1)) $, + $ mat(100, 2, 3; 4, 5, 6; 7, 8, 9; augment: #(vline: 2, stroke: 1pt + blue)) $, +) + +--- + +// Test using matrix line drawing with a set rule. +#set math.mat(augment: (hline: 2, vline: 1, stroke: 2pt + green)) +$ mat(1, 0, 0, 0; 0, 1, 0, 0; 0, 0, 1, 1) $ + +#set math.mat(augment: 2) +$ mat(1, 0, 0, 0; 0, 1, 0, 0; 0, 0, 1, 1) $ + +#set math.mat(augment: none) + +--- +// 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) $, |
