Skip to content

如何让 cases 中某列右对齐?

如何让 cases 中某列右对齐?

cases中的内容刻意全部左对齐

typst
$ f = cases(
  137 & "if" (n+1) in NN,
  0   & "otherwise",
) $
Typst compiled image

若想让“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"
$) $
Typst compiled image

相关链接:

What do you think?
  • 0
  • 0
  • 0
  • 0
  • 0
  • 0
Comments
  • Latest
  • Oldest
  • Hottest
Powered by Waline v3.5.1

基于 MIT 许可发布