Info
This site is generated using the static site generator developed by the Typst Community. Please adjust the text content of this banner according to your usage requirements. At Typst GmbH's request, when publishing documentation, you must clearly indicate that it is non-official and display the version of Typst being documented. For details, refer to Issue #874 on typst/typst.
TypstDocumentEnglish
v0.dev.2025-09-12

Introspection

Interactions between document parts.

This category is home to Typst's introspection capabilities: With the counter function, you can access and manipulate page, section, figure, and equation counters or create custom ones. Meanwhile, the query function lets you search for elements in the document to construct things like a list of figures or headers which show the current chapter title.

Most of the functions are contextual. It is recommended to read the chapter on context before continuing here.

Definition

  • Counts through pages, elements, and more.
  • Provides the current location in the document.
  • Determines the location of an element in the document.
  • Identifies an element in the document.
  • Exposes a value to the query system without producing visible content.
  • Finds elements in the document.
  • Manages stateful parts of your document.
Open official docs

Search