情報アイコン
情報 / Info
当サイトは、Typst GmbHの許諾を得て、日本語コミュニティ「Typst Japan Community」がTypst vdev.3ed92cdeの公式ドキュメントを翻訳したものです。誤訳や古い情報が含まれている可能性があるため、公式ドキュメントとの併用を推奨します。翻訳の改善やサイトの機能向上について、GitHubでのIssueやPull Requestを歓迎します。コミュニティにご興味のある方はDiscordサーバー「くみはんクラブ」にぜひご参加ください。
This site provides a Japanese translation of the Typst vdev.3ed92cde 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".
言語アイコン
翻訳率
21%
言語アイコン
翻訳済み

このページは日本語に翻訳済みです。

ratio

A ratio of a whole.

A ratio is written as a number, followed by a percent sign. Ratios most often appear as part of a relative length, to specify the size of some layout element relative to the page or some container.

#rect(width: 25%)
Preview

However, they can also describe any other property that is relative to some base, e.g. an amount of horizontal scaling or the height of parentheses relative to the height of the content they enclose.

Scripting

Within your own code, you can use ratios as you like. You can multiply them with various other types as shown below:

Multiply byExampleResult
ratio27% * 10%2.7%
length27% * 100pt27pt
relative27% * (10% + 100pt)2.7% + 27pt
angle27% * 100deg27deg
int27% * 254%
float27% * 0.3703710%
fraction27% * 3fr0.81fr

When ratios are displayed in the document, they are rounded to two significant digits for readability.

原文(英語)を開く
右矢印アイコン

検索