Hi,
is there a way to retrieve the physical number of pages from within Typst, even if the logical number might have changed, e.g. due to a reset of the respective page counter?
I’d like to use different pagenumbers starting with a new count for the annex, which prevents me from simply doing
One possibility would be to add an empty element at the end of the document, which you can query and get the location from.
Total Pages: #context query(<end>).first().location().page()
... // All your content, including appendix
#[] <end>
You can of course also put that empty element in a show-all rule, so you don’t need to add additional boilerplate at the end of the document, when the rest of the document setup is somewhere else: