Can I reset the slide counter in Polylux 0.4?

In Polylux 0.3.2, it was possible to access logic.logical-slide, which is a logical counter for the slide number. For me, it was convenient to create a presentation appendix containing backup slides: the first slides until the conclusion had normal numbering (1, 2, 3…), but after that, the appendix slides had roman numbering (i, ii, iii…). To do that, I had to reset logic.logical-slide to 0 after the conclusion.

However, that doesn’t seem possible in Polylux 0.4, because logic.logical-slide is no longer exposed in the API. Now, you have access to toolbox.slide-number and toolbox.last-slide-number, which respectively give the current and last slide numbers, but as far as I know, you cannot reset the logical slide counter.

Is there a new method to do that in Polylux 0.4?

1 Like

It took me some time to figure out, but you can access the logical slide counter using

counter("logical-slide")

(see here).

So counter("logical-slide").update(0) should do the trick. It does not seem to be officially documented behaviour though, so might be prone to changes.