Skip to content

Commit

Permalink
feat: add current-section-number
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeX4 committed Mar 11, 2024
1 parent ccc0ed4 commit c9e5a6c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions utils/states.typ
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@
sections.last().title
})

#let _typst-numbering = numbering
#let current-section-number(numbering: "01") = locate(loc => {
let sections = sections-state.at(loc)
_typst-numbering(numbering, sections.len() - 1)
})

#let touying-progress-with-sections(callback) = locate(loc => {
callback((
current-sections: sections-state.at(loc),
Expand Down

0 comments on commit c9e5a6c

Please sign in to comment.