Hi all,
I am a recent convert trying to replicate my standard LaTeX beamer template in Typst using Polylux (0.4). One thing that has been giving me a headache is how to stop incrementing the (logical) slide counter once I reach the appendix. Is there any good way to do this?
The specific behaviour I want to achieve is to have an appendix at the end of my slide deck in which slides are not numbered and do not count towards the total number of slides (because I use “Slide X out of Y”-style page numbering on my main slides).
My best shot so far has been to define an #appendix
function as follows:
#let appendix(content) = {
// do not show page numbers (or any footer at all) in the appendix
set page(
footer: none
)
// revert the slide number increase to the first appendix slide
counter("logical-slide").update(n => n - 1)
// prevent the slide counter from increasing with each new slide
show pagebreak: it => context {
counter("logical-slide").update(n => n - 1)
}
it
}
content
}
This works well in static mode, but as soon as I add animations, I run into trouble because, obviously, a pagebreak
happens between each subslide as well, so the logical slide counter decreases by too much.
Does anyone know of a better way to prevent the slide counter from incrementing? Or of an entirely different way to store the total number of logical slides up to the appendix, and access them in the footer?
Cheers,
Joscha