polylux icon indicating copy to clipboard operation
polylux copied to clipboard

Discussion regarding potentially interesting Typst feature: state freezing/restoring

Open edgarogh opened this issue 2 years ago • 0 comments

This is not really an issue per-se, but a feature request for Typst, that you might be very interested in. As such, you're probably in the best position to suggest a possible implementation that would suit your needs.

c.f. typst/typst#1841


Issue

In order to generate subslides, polylux needs to be able to duplicate a slide in similar-but-not-equal versions. They differ in which #only or #uncover are shown, but all the rest (page number, title numbers, etc.) should be strictly identical.

Except that this is not exactly what happens. If you decide to enable numbering on headings, each "instance" of the heading will have a different number on its subslide, which is certainly not what you (or at least I) want. Here's an example. Similarly, footnote numbers are duplicated. And so would be any counter or state-managed value.

Suggestion

I invite you to go to the issue linked above, as I've explained a few possible implementations, but the essential idea would be to have a new primitive element function that can be used to create copies of a content with a frozen state.

edgarogh avatar Aug 03 '23 13:08 edgarogh