注意 当サイトは、Typst v0.11.1 公式ドキュメントを、日本語コミュニティが非公式に翻訳したものです。誤訳・未訳・古い情報が含まれている可能性があるため、公式ドキュメント との併用を推奨します。このサイトの内容に誤りを発見された方は、GitHubリポジトリまでご報告を頂けましたら幸いです。我々のコミュニティにご興味のある方は、ぜひ非公式Discordサーバー「くみはんクラブ」にご参加ください。
Warning: This site provides an unofficial translation of the Typst v0.11.1 documentation by the Japanese Community. Please note that there may be some inaccuracies, untranslated sections or outdated information. We highly recommend referring to the latest official documentation as well. If you find any errors in the content, please let us know through our GitHub repository. If you are interested in our community, feel free to join our unofficial Discord server, “Kumihan Club.”
Typst ドキュメント日本語版

Left/Right Calculation

Delimiter matching.

The lr function allows you to match two delimiters and scale them with the content they contain. While this also happens automatically for delimiters that match syntactically, lr allows you to match two arbitrary delimiters and control their size exactly. Apart from the lr function, Typst provides a few more functions that create delimiter pairings for absolute, ceiled, and floored values as well as norms.

Example

$ [a, b/2] $
$ lr(]sum_(x=1)^n] x, size: #50%) $
$ abs((x + y) / 2) $
Preview

Calculation

lr

Scales delimiters.

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

size
auto relative
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

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

Default:auto

body
content
RequiredPositional
Positional parameters are specified in order, without names.

The delimited content, including the delimiters.

mid

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

math.mid() -> content
$ { x mid(|) sum_(i=1)^n w_i|f_i (x)| < 1 } $
Preview

body
content
RequiredPositional
Positional parameters are specified in order, without names.

The content to be scaled.

abs

Takes the absolute value of an expression.

$ abs(x/2) $
Preview

size

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

body
content
RequiredPositional
Positional parameters are specified in order, without names.

The expression to take the absolute value of.

norm

Takes the norm of an expression.

$ norm(x/2) $
Preview

size

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

body
content
RequiredPositional
Positional parameters are specified in order, without names.

The expression to take the norm of.

floor

Floors an expression.

$ floor(x/2) $
Preview

size

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

body
content
RequiredPositional
Positional parameters are specified in order, without names.

The expression to floor.

ceil

Ceils an expression.

$ ceil(x/2) $
Preview

size

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

body
content
RequiredPositional
Positional parameters are specified in order, without names.

The expression to ceil.

round

Rounds an expression.

$ round(x/2) $
Preview

size

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

body
content
RequiredPositional
Positional parameters are specified in order, without names.

The expression to round.