polylux
polylux copied to clipboard
Weak pagebreak in polylux-slide can break custom page setup
Issue
When a custom page setting is used in slides, adding a "hidden" (see MRE below) heading in-between slides completely disables this page setting.
Context
I'm trying to create a theme for myself, largely inspired by metropolis
, in which the slides' headers can get directly filled with the current headings.
Source
I must say that I really don't understand what's going on, but apparently, it's linked to the fact that page breaks are weak between slides, as set in:
https://github.com/andreasKroepelin/polylux/blob/453101923c3338d2b61c6944d03c45513b20138b/logic.typ#L273-L278
because setting it to false
fixes it for me.
Possible fix
Either set weak to false directly, or, if weak pagebreaks are needed in some contexts, provide the option to disable them.
MRE
#import "@preview/polylux:0.3.1": *
#import themes.metropolis: *
#show: metropolis-theme
#show heading.where(level: 1): it => {}
= Hidden heading
#slide(title: "Ignored slide title")[
== My slide title
Hello, world!
]
#slide(title: "Working slide title")[
== A quiz
What is the capital of the Republic of Benin?
]
@dherse Do you happen to recognise if that's the same issue that you caught recently? It looks similar at least.
Yes indeed that does appear to be the same issue
But in the end you solved it, right?
I mean the way I solved it was by manually adding a weak pagebreak before the first slide which somehow fixed it, but I am not sure why :(
But is there a reason page breaks are set as weak? I couldn't figure it out.
I surely had a reason when I implemented that :D It might very well be that Typst's pagebreak behaviour changed since then.
I surely had a reason when I implemented that :D It might very well be that Typst's pagebreak behaviour changed since then.
I do think some things changed since there were some changes to the behaviour of breaking on """empty""" page (triple quote because place
blocks used to count as empty pages). Perhaps it's something to do with that?
Probably also regarding state updates. I actually don't know if that's empty content or not currently. 🤔
I think that currently it counts as empty content 🤔