mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
27 lines
391 B
Typst
27 lines
391 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 alternative delimiter.
|
|
#set math.mat(delim: "[")
|
|
$ mat(1, 2; 3, 4) $
|