andreasKroepelin / polylux

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

Impove PDF bookmarks #72

Closed Drodt closed 1 year ago

Drodt commented 1 year ago

Fixes #32.

Like mentioned in #32, polylux currently creates too many PDF bookmarks and users have little control over this. This PR addresses the issue.

The themes clean and university no longer create a bookmark for every slide title. Only when a title is given and the bookmarked parameter is true do we add a bookmark.

For clean and metropolis, when a new-section-slide is created, it is bookmarked.

For university, when the new-section parameter is set, we bookmark this new section heading.

Someone please check if I broke some themes.

andreasKroepelin commented 1 year ago

I think there was a problem earlier where every overlay slide produced a new bookmark. I fixed that quite a while ago by making only the first appearance of titles in a set of overlay slides outlined, which implies it is also not bookmarked on later occurences. I don't see any further issues about bookmarks then?