Development build 586e1bd4
Typst文档简体中文版v0.15.1 + dev 586e1bd4

左/右 [⚠️ need proofread]

定界符匹配。

lr函数允许您匹配两个定界符并按其包含的内容缩放它们。虽然在语法上匹配的定界符也会自动进行,但lr允许您匹配两个任意的定界符并精确控制它们的大小。除了lr函数外,Typst还提供了一些创建绝对值、上取整和下取整值以及范数的定界符配对的其他函数。 [⚠️]

示例

$ [a, b/2] $ $ lr(]sum_(x=1)^n], size: #50%) x $ $ abs((x + y) / 2) $ $ \{ (x / y) \} $ #set math.lr(size: 1em) $ { (a / b), a, b in (0; 1/2] } $

函数

lr元素
Question mark
自始可用Go to source

Scales delimiters.

While matched delimiters scale by default, this can be used to scale unmatched delimiters and to control the delimiter scaling more precisely.

math.lr() → content

size
relative
可用set规则
Question mark
默认值:100% + 0pt

The size of the brackets, relative to the height of the wrapped content.

body
content
必需参数
Question mark
位置参数
Question mark

The delimited content, including the delimiters.

mid元素
Question mark
0.10.0起可用Go to source

Scales delimiters vertically to the nearest surrounding lr() group.

Expand展开示例
$ { x mid(|) sum_(i=1)^n w_i abs(f_i (x)) < 1 } $
math.mid(content) → content

body
content
必需参数
Question mark
位置参数
Question mark

The content to be scaled.

abs自始可用Go to source

Takes the absolute value of an expression.

Expand展开示例
$ abs(x/2) $
math.abs() → content

size

The size of the brackets, relative to the height of the wrapped content.

Default: The current value of lr.size.

body
content
必需参数
Question mark
位置参数
Question mark

The expression to take the absolute value of.

norm自始可用Go to source

Takes the norm of an expression.

Expand展开示例
$ norm(x/2) $
math.norm() → content

size

The size of the brackets, relative to the height of the wrapped content.

Default: The current value of lr.size.

body
content
必需参数
Question mark
位置参数
Question mark

The expression to take the norm of.

floor自始可用Go to source

Floors an expression.

Expand展开示例
$ floor(x/2) $
math.floor() → content

size

The size of the brackets, relative to the height of the wrapped content.

Default: The current value of lr.size.

body
content
必需参数
Question mark
位置参数
Question mark

The expression to floor.

ceil自始可用Go to source

Ceils an expression.

Expand展开示例
$ ceil(x/2) $
math.ceil() → content

size

The size of the brackets, relative to the height of the wrapped content.

Default: The current value of lr.size.

body
content
必需参数
Question mark
位置参数
Question mark

The expression to ceil.

round自始可用Go to source

Rounds an expression.

Expand展开示例
$ round(x/2) $
math.round() → content

size

The size of the brackets, relative to the height of the wrapped content.

Default: The current value of lr.size.

body
content
必需参数
Question mark
位置参数
Question mark

The expression to round.