Restart chapter numbering at each part in books #15070
mcanouil
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description
In a book project, chapter numbers run across the whole book. When the book is split into parts, the first chapter of the second part carries on from the last chapter of the first part, rather than starting again at 1. The only reset happens for the appendices.
Restarting the numbering in each part would help with books where each part stands on its own, such as a thesis made of several studies, or course notes split by term. It would be good to have this as a book option that works the same way in HTML, PDF and Typst. Chapter numbers in each part would then start at 1, with sections, figures and cross-references following them. Some users would also like the part to show in the number, as in A.1 or I.1, so references stay unique across parts.
This comes up regularly:
As of Quarto 1.10.19, there are workarounds for PDF and Typst, but none for HTML.
For PDF, LaTeX can reset the chapter counter at each part:
For Typst, the
partfunction from theorange-booktemplate can be wrapped so that each new part resets the heading counter:For HTML, Quarto sets the number of each chapter itself, so setting
number-offsetin a chapter has no effect. The only way round it is to mark chapters as{.unnumbered}and write the numbers in the titles by hand, which loses section numbers and cross-reference numbers.All reactions