Skip to content

Commit

Permalink
feat: add reset-footnote
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeX4 committed May 11, 2024
1 parent 6e3c3c6 commit 452583a
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions slide.typ
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,15 @@
}
let bodies = bodies.pos()
let page-preamble(curr-subslide) = locate(loc => {
[
#metadata((t: "NewSlide")) <pdfpc>
#metadata((t: "Idx", v: loc.page() - 1)) <pdfpc>
#metadata((t: "Overlay", v: curr-subslide - 1)) <pdfpc>
#metadata((t: "LogicalSlide", v: states.slide-counter.at(loc).first())) <pdfpc>
]
if self.reset-footnote {
counter(footnote).update(0)
}
if loc.page() == self.first-slide-number {
// preamble
utils.call-or-display(self, self.preamble)
Expand All @@ -392,12 +401,7 @@
pdfpc.pdfpc-file(loc)
}
}
[
#metadata((t: "NewSlide")) <pdfpc>
#metadata((t: "Idx", v: loc.page() - 1)) <pdfpc>
#metadata((t: "Overlay", v: curr-subslide - 1)) <pdfpc>
#metadata((t: "LogicalSlide", v: states.slide-counter.at(loc).first())) <pdfpc>
]
utils.call-or-display(self, self.page-preamble)
})
// update states
let _update-states(repetitions) = {
Expand Down Expand Up @@ -641,7 +645,11 @@
// default is 1
first-slide-number: 1,
// global preamble
preamble: [],
preamble: none,
// page preamble
page-preamble: none,
// reset footnote
reset-footnote: true,
// page args
page-args: (
paper: "presentation-16-9",
Expand Down

0 comments on commit 452583a

Please sign in to comment.