[texhax] Problem with number within

Jeff Barnett jbbrus at comcast.net
Fri May 11 22:01:45 CEST 2012


On 5/11/2012 1:06 PM, Michael Barr wrote:
> If you compile the following sample
> \documentclass{article}
> \begin{document}
> \section{one}
>  \subsubsection{A subsubsection}
> \section{two}
>  \subsubsection{A subsubsection}
> \end{document}
>
> you will see that the first subsubsection is correctly named 1.0.1, 
> but the second is called 2.0.2 instead of the expected 2.0.1.  Now I 
> don't know why one would want a subsubsection with no subsection, but 
> one of the contributors to the online journal whose class files I 
> maintain did and is now complaining about this bug.  It clearly comes 
> from the line
> \newcounter {subsubsection}[subsection]
>
> Michael Barr
>
The Section counter, when incremented, resets the Subsection counter; 
Subsection when it is incremented/reset resets the Subsubsection counter 
but it must be used for the effect to take place; etc. In your example, 
Subsection doesn't appear so the chain is broken.
-- Jeff Barnett


More information about the texhax mailing list