注意 当サイトは、Typst v0.12.0 公式ドキュメントを、日本語コミュニティが非公式に翻訳したものです。誤訳・未訳・古い情報が含まれている可能性があるため、公式ドキュメント との併用を推奨します。このサイトの内容に誤りを発見された方は、GitHubリポジトリまでご報告を頂けましたら幸いです。我々のコミュニティにご興味のある方は、ぜひ非公式Discordサーバー「くみはんクラブ」にご参加ください。
Warning: This site provides an unofficial translation of the Typst v0.12.0 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 ドキュメント日本語版

equation Element
Element functions can be customized with set and show rules.

A mathematical equation.

Can be displayed inline with text or as a separate block.

Example

#set text(font: "New Computer Modern")

Let $a$, $b$, and $c$ be the side
lengths of right-angled triangle.
Then, we know that:
$ a^2 + b^2 = c^2 $

Prove by induction:
$ sum_(k=1)^n k = (n(n+1)) / 2 $
Preview

By default, block-level equations will not break across pages. This can be changed through show math.equation: set block(breakable: true).

Syntax

This function also has dedicated syntax: Write mathematical markup within dollar signs to create an equation. Starting and ending the equation with at least one space lifts it into a separate block that is centered horizontally. For more details about math syntax, see the main math page.

引数
Parameters are the inputs to a function. They are specified in parentheses after the function name.

block
bool
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

Whether the equation is displayed as a separate block.

Default:false

numbering
none str function
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

How to number block-level equations.

Default:none

View example
#set math.equation(numbering: "(1)")

We define:
$ phi.alt := (1 + sqrt(5)) / 2 $ <ratio>

With @ratio, we get:
$ F_n = floor(1 / sqrt(5) phi.alt^n) $
Preview

number-align
alignment
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

The alignment of the equation numbering.

By default, the alignment is end + horizon. For the horizontal component, you can use right, left, or start and end of the text direction; for the vertical component, you can use top, horizon, or bottom.

Default:end + horizon

View example
#set math.equation(numbering: "(1)", number-align: bottom)

We can calculate:
$ E &= sqrt(m_0^2 + p^2) \
    &approx 125 "GeV" $
Preview

supplement
none auto content function
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

A supplement for the equation.

For references to equations, this is added before the referenced number.

If a function is specified, it is passed the referenced equation and should return content.

Default:auto

View example
#set math.equation(numbering: "(1)", supplement: [Eq.])

We define:
$ phi.alt := (1 + sqrt(5)) / 2 $ <ratio>

With @ratio, we get:
$ F_n = floor(1 / sqrt(5) phi.alt^n) $
Preview

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

The contents of the equation.