I’m currently working on a slide template and I’m a bit stuck when it comes to the handling of the headings.
At each new page I would like to display the current heading, so that I don’t have to manually place it and let Typst do the layout. So far I haven’t found a way to detect a pagebreak though.
There are no callbacks that tell you there is a new page found, and you can add to it. You can manually call, and it will add 1 heading max because of on-demand checking.
You can look into if it can be used, this can be used for “blocks that know when they are placed on more than one page”. It could however be quite limiting to force the user’s content to be placed inside a grid: for example, then regular pagebreak() is suddenly disallowed.