Skip to content

使用技巧

方法的全局配置

全局配置全部暴露在 setup 方法中,像 choicesquestion 等方法中的一些配置并没有暴露在 setup 方法中。若要全局配置方法中的某些参数,可以按照以下的方法配置。比如选项的 label 使用带圈数字,不使用默认的 A. B. C. D.

typst
// 全局设置选项的label
#let choices = choices.with(label:"①")
#choices(
  [选项1],
  [选项2],
  [选项3],
  [选项4],
)
// 输出结果
① 选项1       ② 选项2         ③ 选项3         ④ 选项4

Released under the MIT License.