TypstDocumentation

casesElement
Question mark

A case distinction.

Content across different branches can be aligned with the & symbol.

Example

$ f(x, y) := cases(
  1 "if" (x dot y)/2 <= 0,
  2 "if" x "is even",
  3 "if" x in NN,
  4 "else",
) $
Preview

Parameters
Question mark

math.cases() -> content

delim
string
Settable
Question mark

The delimiter to use.

Default: "{"

View example
#set math.cases(delim: "[")
$ x = cases(1, 2) $
Preview

children
content
RequiredPositional
Question mark
Variadic
Question mark

The branches of the case distinction.