TypstDocumentation

cases

A case distinction.

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

Example

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

Parameters
Question mark

cases()

branches
contentPositional
Question mark
Variadic
Question mark

The branches of the case distinction.