情報アイコン
情報 / 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".
言語アイコン
未翻訳

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

location

Identifies an element in the document.

A location uniquely identifies an element in the document and lets you access its absolute position on the pages. You can retrieve the current location with the here function and the location of a queried or shown element with the location() method on content.

Locatable elements

Currently, only a subset of element functions is locatable. Aside from headings and figures, this includes equations, references, quotes and all elements with an explicit label. As a result, you can query for e.g. strong elements, but you will find only those that have an explicit label attached to them. This limitation will be resolved in the future.

定義
ヘルプアイコン

page

Returns the page number for this location.

Note that this does not return the value of the page counter at this location, but the true page number (starting from one).

If you want to know the value of the page counter, use counter(page).at(loc) instead.

Can be used with here to retrieve the physical page position of the current context:

self.page(
)->
右矢印アイコン
例を表示
#context [
  I am located on
  page #here().page()
]
Preview

position

Returns a dictionary with the page number and the x, y position for this location. The page number starts at one and the coordinates are measured from the top-left of the page.

If you only need the page number, use page() instead as it allows Typst to skip unnecessary work.

self.position(
)->

page-numbering

Returns the page numbering pattern of the page at this location. This can be used when displaying the page counter in order to obtain the local numbering. This is useful if you are building custom indices or outlines.

If the page numbering is set to none at that location, this function returns none.

self.page-numbering(
)->

検索