如何让 cases 中某列右对齐?
cases
中的内容刻意全部左对齐。
typst
$ f = cases(
137 & "if" (n+1) in NN,
0 & "otherwise",
) $

若想让“otherwise”这列右对齐,可以换用lr
,使用&
交替左右对齐:
typst
#let lrcases(it) = math.lr($\{$ + block(it))
#lrcases($
& 137 & "if" (n+1) in NN \
& 0 & "otherwise"
$)
$ f = #lrcases($
& 137 & "if" (n+1) in NN \
& 0 & "otherwise"
$) $

相关链接: