Hi everyone,
I’m working on a document in Typst where I want to use different page numbering styles:
- The front matter (e.g. table of contents) should use Roman numerals (I, II, III, …).
- The main content should use Arabic numerals (1, 2, 3, …).
- In the footer, this works fine with:
#set page(footer: context [
#set text(size: 10pt)
#align(center)[#counter(page).display("I")]
])
However, the problem is that in the table of contents (#outline()
), the page numbers are still displayed in Arabic numerals, even if they are shown in Roman numerals in the footer.
Important notes:
I can’t use #set page(numbering: "I")
because I need the page numbers to be displayed in 10pt font, and this setting doesn’t allow me to control the text size of the numbers in the footer.
Is there a way to make #outline()
reflect the actual display format of the page numbers – Roman or Arabic – depending on the section? In other words: Can I make the page numbers in the TOC match what is shown in the footer?
And if this isn’t directly supported, is there a workaround (e.g. with #show outline.entry
or counter(page).at(...)
) to conditionally change the format shown in the TOC based on section or page number?
Thanks in advance for your help!