typst/tests/typ/math/matrix.typ
2023-02-02 14:40:34 +01:00

35 lines
496 B
Typst

// Test matrices.
---
// Test semicolon syntax.
#set align(center)
$mat() dot
mat(;) dot
mat(1, 2) dot
mat(1, 2;) \
mat(1; 2) dot
mat(1, 2; 3, 4) dot
mat(1 + &2, 1/2; &3, 4)$
---
// Test sparse matrix.
$ mat(
1, 2, ..., 10;
2, 2, ..., 10;
dots.v, dots.v, dots.down, dots.v;
10, 10, ..., 10;
) $
---
// Test baseline alignment.
$ mat(
a, b^2;
sum_(x \ y) x, a^(1/2);
zeta, alpha;
) $
---
// Test alternative delimiter.
#set math.mat(delim: "[")
$ mat(1, 2; 3, 4) $