Hello @FrederikRichter,
to complement @jbirnick’s answer using great-theorems:
- If you theorems and examples are
figures
, then it’s easier to query and retrieve the content. You might find it easier to write things likeoutline(target: figure.where(kind: "theorems")
! - I do not think there is a way to import labels from an external file (see How to cross-reference labels defined in external typst projects?), your best bet is probably to have a specific show rule to filter the content you do not want, e.g.,
show: only-maths
whereonly-maths
reads the whole document body and selects only your theorems/examples. - I think you might find it easier to just query all your theorems/examples on a separate page and specifically output that one using
typst --pages <PAGES>
. (See above answer on how to query).
If you have any code that minimally reproduces your use case, don’t hesitate to share it, or to share more details!