Open christian-leingang opened 2 days ago
Hi there 👋🏻
This was previously possible, but I omitted it because I couldn't get it working with the three different numbering styles.
The problem is that in order to get the total page count at the end of the main section with the Latin numbering, I have to create a custom footer passing ..counter(page).get()
for the current page and ..counter(page).at(<some-label>)
to get the total number of pages.
Like this:
set page(
numbering: "1",
footer: context align(
numbering-alignment,
numbering(
"1 / 1",
..counter(page).get(),
..counter(page).at(<end>),
),
),
)
If you now provide "1"
as numbering, the footer still displays the numbering like this "11"
, so current-page
total-pages
without a space in between. This means I have to remove ..counter(page).at(<end>)
, but if I remove it and you provide a style that shows the total number of pages, the total number of pages will always be 1 as the data is missing.
I will take a look again and see if I can find a solution 🤞🏻
Problem
The Page Numbering Format is currently hard-coded: lib.typ ll. 400.
Solution
Introduce a new option for the page numbering format, such as
numbering: "1"
ornumbering: "1/1"
, to make the template more adaptable. (See Typst page setup guide for reference)Current Workaround
Add the following snippet below the main configuration and before the content:
However, this workaround overrides the entire footer.