andreasKroepelin / polylux

A package for creating slides in Typst
https://polylux.dev/book
MIT License
1.18k stars 55 forks source link

[bug] outline and dynamic animations #146

Open foxyseta opened 9 months ago

foxyseta commented 9 months ago

Minimal example

#import "@preview/polylux:0.3.1": *
#import themes.university: *

#slide(title: "Contents")[
  #polylux-outline()
]

#slide(title: [The open question: $P eq.not NP -> SampNP subset.eq.not AvgP$ ?],
  new-section: Title)[
    #only(1)[a]
    #uncover((beginning: 2))[b]
    #uncover(3)[c]
]

Actual result

The outline features one entry per subslide (so three in total).

Expected result

The outline features a unique entry for the logical slide.

andreasKroepelin commented 9 months ago

Good catch. For further reference (and future me fixing this), here is the culprit: https://github.com/andreasKroepelin/polylux/blob/main/themes%2Funiversity.typ#L127-L129

foxyseta commented 9 months ago

Glad I could help. Love your work!

foxyseta commented 9 months ago

It appears it also gives problems with theorems/definitions numbering packages, e.g. https://github.com/typst/packages/tree/main/packages/preview/ctheorems/1.1.0.

andreasKroepelin commented 9 months ago

Yeah that's a thing we can't do anything about it here, unfortunately. The Typst team is aware of that, there might be a solution some day :)

foxyseta commented 9 months ago

Is there an open issue on the officual typst repository then? Should this be listed under "Known issues" or something?

andreasKroepelin commented 9 months ago

See https://github.com/typst/typst/issues/1841

foxyseta commented 9 months ago

Thanks! What about content too big for one slide that hence spawns on multiple slides, though? This wouldn't be a state freeze limitation, right?

andreasKroepelin commented 9 months ago

No, but that's intentionally allowed. Think long bibliographies, for example.

foxyseta commented 9 months ago

Yeah, that's my use case. But that brings about multiple "References" entries in the ToC.

andreasKroepelin commented 9 months ago

Oh I see... Yeah that should be fixable.