How can I create "sub-outlines" with restricted scopes?

I want to create an outline for a specific section or heading, I want it to include only the sub headings inside the intended heading/headings.

What I’m aware of now is that i can pass a function to outline(target: function), but I don’t know how to use it and I can’t find examples in the documentation. I also found that :

context counter(heading.where(level : 1)).get()

gets me the number of the level one heading that I need.

Hey there, you may be interested in minitoc – Typst Universe. While it has had no updates since its release, it still works without problems, including in 0.12-rc2.

2 Likes

I checked the code of the package in gitlab and it seems that it isn’t being updated because it is done as the package is simply the definition of the function you need for the scope functionality. I’d hope if typst adds scope to the outline function natively.

1 Like

Feel free to write a feature request! Typst is always looking to improve.