注意:该中文文档为社区驱动的非官网文档,可能存在错译、漏译或过时等问题,请以官网文档 Documentation 为准,如发现错漏,也欢迎 您的贡献镜像)。Typst 非官方中文交流 QQ 群:793548390
Warning: the Chinese document is a community-driven non-official document, there may be mistranslation, omission or outdated problems, please refer to the official website documentation.
Typst 中文文档

Sizes 函数族

数学公式中表达式的强制大小样式。

这些函数允许手动配置表达式元素的尺寸,使它们看起来像处于内联/显示模式,或者在根式、上下标中使用的那样。

函数族

display

在数学模式中强制为“显示样式”。

这是公式块的常规大小。

math.display() -> content
$sum_i x_i/2 = display(sum_i x_i/2)$
Preview

body
content
必需参数位置参数
位置参数按顺序传入,不带名称。

The content to size.

cramped

是否像常规上下标那样,为指数限制高度。

默认:false

inline

强制显示为“内联(文本)样式”。

这是内联公式的正常大小。

math.inline() -> content
$ sum_i x_i/2
    = inline(sum_i x_i/2) $
Preview

body
content
必需参数位置参数
位置参数按顺序传入,不带名称。

The content to size.

cramped

是否像常规上下标那样,为指数限制高度。

默认:false

script

强制显示为脚本大小。

这是用于上下标的较小尺寸。

math.script() -> content
$sum_i x_i/2 = script(sum_i x_i/2)$
Preview

body
content
必需参数位置参数
位置参数按顺序传入,不带名称。

The content to size.

cramped

是否像常规上下标那样,为指数限制高度。

默认:true

sscript

在数学中强制显示为次脚本大小。

这是用于二级上下标的最小尺寸。

math.sscript() -> content
$sum_i x_i/2 = sscript(sum_i x_i/2)$
Preview

body
content
必需参数位置参数
位置参数按顺序传入,不带名称。

要设定大小的内容。

cramped

是否像常规上下标那样,为指数限制高度。

默认:true