Skip to main content
Glama
locate.md832 B
# Locate ## `locate` 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`]($location.page) number and [`position`]($location.position) (page, x, y) for that element. # Examples Locating a specific element: ```example #context [ Introduction is at: \ #locate(<intro>).position() ] = Introduction <intro> ``` ## Parameters ### selector *(required)* A selector that should match exactly one element. This element will be located. Especially useful in combination with - [`here`] to locate the current context, - a [`location`] retrieved from some queried element via the [`location()`]($content.location) method on content. ## Returns - location

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/FujishigeTemma/typst-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server