-
Hi, I want to retrieve the total number of pages. Unfortunately, I couldn’t find this information in the documentation, or perhaps I don’t know how to access the desired value. My goal is to create a custom page numbering display inside footer using the following format (which only shows current page number): #counter(page).display() / #counter(page).last(loc) Desired output:
But the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Try #counter(page).display("1") / #locate(loc => {
let lastpage = counter(page).final(loc)
[#lastpage.at(0)]
}) |
Beta Was this translation helpful? Give feedback.
-
Hello, the following should work.
|
Beta Was this translation helpful? Give feedback.
Hello, the following should work.
You can find more information at: https://typst.app/docs/guides/page-setup-guide/#custom-footer-with-page-numbers
and https://typst.app/docs/reference/introspection/counter/#definitions-display.