Skip to content

Return location information in typst query #7008

Closed

Description

@MDLC01

Description

In the output of typst query, add a location field for each element, containing page, x, and y fields corresponding to the element's page and position on the page, as returned by location.page and location.position.

Use Case

This would make it easier for outside tools to inspect a Typst document and perform various operations based on that, such as exporting only the pages that contain a given element (e.g., the bibliography). AFAIK, getting this information is currently only possible by placing metadata elements in the document, which requires modifying the document and is not always an option.

Activity

  1. added
    feature request
    cli
    on Oct 2, 2025
  2. YPares commented on Nov 9, 2025

    @YPares

    +1 for this. Also, it would be great if we could retrieve the position not only in the final artifact but it the typst code itself. It would be really useful for #3278 too.

  3. laurmaedje commented on Nov 10, 2025

    @laurmaedje
    Member

    #7344 would cover this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clifeature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions