Open TakodaS opened 6 months ago
To reset the footnote counter in the page header according to the Typst documentation, you can simply modify the content of the slide in xxxx.typ. This adjustment might resolve your issue. However, be aware that the footnote content could appear before its corresponding citation.
For instance, you might download simple.typ
and import it locally into your main.typ
using the directive #import "libs/simple.typ": *
. Then, modify the import statements as follows:
// previous
#import "../logic.typ"
// after modifying
#import "@preview/polylux:0.3.1": *
#import logic:*
Next, insert counter(footnote).update(0)
after if sections == () [] else { deco-format(sections.last().body) }
on line 52. This change should address the issue where "Footnote numbering increments with subslides".
The output is shown in the following image:
This is known problem and has been discussed extensively elsewhere. It is indeed something that cannot be solved nicely by Polylux without Typst offering some "state freezing".
We can of course discuss whether it makes sense to just always start the footnote counter from 1 on every slide...
@AnnLIU15 This would have be be repeated on a theme-by-theme basis which is not great. I think the only real solution would be to refactor the code so that logic.typ:polylux-slide
implements page
rather than pagebreak
. That way, page header options can be manipulated directly and will hopefully futureproof polylux against any changes.
@andreasKroepelin Can you explain the advantages of using pagebreak
rather than just making a list of new pages and joining them to create subslides?
Or, alternatively, put in a feature request in Typst to add some more options in page break. Thoughts?
I don't think there was a reason to use pagebreak
rather than multiple page
s 🤔 We could try using the latter, I guess...
I have tried implementing this, but ran into the problem that I need to replicate the weak: true
argument of pagebreak using page. By inserting a weak pagebreak, i think typst runs over the code again and removes any blank slides that are generated by polylux. Without this, page(body)
will generate a load of blank slides.
Ah yeah that's probably the reason why I used pagebreak
then.
It is indeed something that cannot be solved nicely by Polylux without Typst offering some "state freezing".
Is there any prospective about it?
We can of course discuss whether it makes sense to just always start the footnote counter from 1 on every slide...
I'd be very much in favor of this, at least as a temporary workaround. Currently, I have to add #counter(footnote).update(0)
to the top of every slide that uses footnotes and subslides.
Is there an opened issue in Typst addressing this topic? If no, it should be opened.
Is there an opened issue in Typst addressing this topic? If no, it should be opened.
https://github.com/andreasKroepelin/polylux/issues/67 https://github.com/typst/typst/issues/1841
With each subslide, the footnote numbering increments. Typst's footnote documentation says the following:
However, since polylux implements new pages using
pagebreak
I'm not sure how to fix this.