touying-typ / touying

Touying is a powerful package for creating presentation slides in Typst.
https://touying-typ.github.io/
MIT License
814 stars 20 forks source link

Section/Subsection Heading Footnotes Duplicated #110

Open spidersouris opened 3 weeks ago

spidersouris commented 3 weeks ago

Description of Issue

Defining a footnote on a section/subsection heading (level 1 or 2) duplicates it.

Minimal Example

#import "@preview/touying:0.5.2": *
#import themes.simple: *

#show: simple-theme.with(aspect-ratio: "16-9")
#show heading: it => text(fill: red, smallcaps(it))

= Title#footnote("this is a duplicated footnote")

== First Slide#footnote("this is another duplicated footnote")

=== 123#footnote("this footnote is fine though")

Hello, Touying!

Hello, Typst!

Current Behavior

It seems that footnotes are applied once to the section/subsection title (in the header) and once to the slide title? The screenshot below shows that footnote 1 first appears on page 2 next to the "First Slide" section title, and a second identical footnote (numbered 2) appears on the very first slide next to "Title".

image

OrangeX4 commented 3 weeks ago

There is currently no good solution for this, but try not to use footnote in the heading.