I used the advice in How to split a latex document using parts and chapters to section my book in to parts and chapters. However, the table of contents has links to chapter n in part 1, for chapter n in any part.

I used \counterwithin* {chapter}{part} to get around this. Is this the right solution?


Package hyperref needs unique anchor names. The anchor names are mostly using the counter values. To support non-unique counter values, package hyperref uses a companion form of the counter theHcounter, which is not used for typesetting but for the anchor names. Thus you would need, e.g.:


Package hyperref adds support for \@addtoreset or \counterwithin, but this will only work, when they are used after hyperref is loaded.





Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.