mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
21 lines
287 B
Typst
21 lines
287 B
Typst
// Test vectors, matrices, and cases.
|
|
|
|
---
|
|
$ v = vec(1, 2+3, 4) $
|
|
|
|
---
|
|
#set vec(delim: "|")
|
|
$ vec(1, 2) $
|
|
|
|
---
|
|
// Error: 17-20 expected "(", "[", "{", or "|"
|
|
#set vec(delim: "%")
|
|
|
|
---
|
|
$ f(x, y) := cases(
|
|
1 "if" (x dot y)/2 <= 0,
|
|
2 "if" x in NN,
|
|
3 "if" x "is even",
|
|
4 "else",
|
|
) $
|