Is there some counter that holds the number of \chapter that are in a \part? Or do I need to define and run my own counter?


No such counter exists, as far as I know. However, a running count of the number of chapters within a part can easily be done (see below).

Accessing the total number of chapters within a part at any point of the document (e.g. at the very beginning of a the part in question) is a little trickier. That would probably require running a first pass, retrieving information on the number of chapters from the auxiliary files, processing it, and running a second pass. I don't know how to do that.






\thetotalch    %returns 3, here

\thetotalch    %returns 2, here


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.