情報アイコン
情報 / Info
当サイトは、Typst GmbHの許諾を得て、日本語コミュニティ「Typst Japan Community」がTypst v0.13.1の公式ドキュメントを翻訳したものです。誤訳や古い情報が含まれている可能性があるため、公式ドキュメントとの併用を推奨します。翻訳の改善やサイトの機能向上について、GitHubでのIssueやPull Requestを歓迎します。コミュニティにご興味のある方はDiscordサーバー「くみはんクラブ」にぜひご参加ください。
This site provides a Japanese translation of the Typst v0.13.1 documentation maintained by the "Typst Japan Community" with permission from Typst GmbH. We recommend using this alongside the official documentation. We welcome contributions through Issues and Pull Requests on our GitHub repository for both translation improvements and website enhancements. Feel free to join our Discord server "Kumihan Club".
言語アイコン
未翻訳

このページはまだ翻訳されていません。原文の内容が表示されています。

assert

Ensures that a condition is fulfilled.

Fails with an error if the condition is not fulfilled. Does not produce any output in the document.

If you wish to test equality between two values, see assert.eq and assert.ne.

Example

#assert(1 < 2, message: "math broke")

引数
ヘルプアイコン

condition
Required
ヘルプアイコン
Positional
ヘルプアイコン

The condition that must be true for the assertion to pass.

message

The error message when the assertion fails.

定義
ヘルプアイコン

eq

Ensures that two values are equal.

Fails with an error if the first value is not equal to the second. Does not produce any output in the document.

assert.eq(
any
,
any
,
)
右矢印アイコン
例を表示
#assert.eq(10, 10)

left
any
Required
ヘルプアイコン
Positional
ヘルプアイコン

The first value to compare.

right
any
Required
ヘルプアイコン
Positional
ヘルプアイコン

The second value to compare.

message

An optional message to display on error instead of the representations of the compared values.

ne

Ensures that two values are not equal.

Fails with an error if the first value is equal to the second. Does not produce any output in the document.

assert.ne(
any
,
any
,
)
右矢印アイコン
例を表示
#assert.ne(3, 4)

left
any
Required
ヘルプアイコン
Positional
ヘルプアイコン

The first value to compare.

right
any
Required
ヘルプアイコン
Positional
ヘルプアイコン

The second value to compare.

message

An optional message to display on error instead of the representations of the compared values.

検索