Skip to content

Support per chapter page numbering with total #4367

@zincers

Description

@zincers

Description

#set page(
  width: 300pt,
  height: 100pt,
  footer: [
    #counter(page).display("1/1", both: true) 
  ]
)
= chapter 1
== page 1.1
#lorem(10)
#pagebreak()
= page 1.2
#lorem(10)
#pagebreak()
= chapter 2
#counter(page).update(1)
== page 2.1
#lorem(10)
#pagebreak()
== page 2.2
#lorem(10)
#pagebreak()
== page 2.3
#lorem(10)

When reset page number each chapter, the total numbers always return the last chapter.

image

In the first chapter, the expected return is 1/2 and 2/2, rather than 1/3 and 2/3

Reproduction URL

No response

Operating system

Windows

Typst version

  • I am using the latest version of Typst

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or requestintrospectionRelated to the introspection category

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions