Typst Fumadocs

Locate

Documentation for the `locate` function.

Determines the location of an element in the document.

Takes a selector that must match exactly one element and returns that element's location. This location can, in particular, be used to retrieve the physical page number and position (page, x, y) for that element.

Examples

Locating a specific element:

Loading compiler...
#locate(
  selector
) -> location

Parameters

Prop

Type

On this page