I'm typesetting a book and one of the chapters separates into two chapters so I need it to count like so:
chapter 1
---------
chapter 2a
----------
chapter 2b
----------
chapter 3
---------
chapter 4
---------
I saw an almost solution here. But this solution doesn't allow me to continue with my non-separated chapter counting.
This is chapters only, the sections are not numbered, and I'm using the book
class with the hyperref
package.
Best Answer
If you're using one of the standard document class that provides
\chapter
(likebook
orreport
), then the following works:The idea behind this solution is to patch
\@chapter
and insert a special macro\updatechaptercounter
. This macro is then redefined in a specific way, depending on whether you start the sub-chapter numbering (\startsubchapters
) or stop it (\stopsubchapters
).If you're using
hyperref
as well, then you need to update the patch as indicated in the above MWE.