4 amslatex/4393: counter only resetting next level within
6 not really a bug but a design decision that was driven by code economy and
7 speed conciderations that are no longer relevant. Prohibits one type of use case.
12 \documentclass{article}
14 \AUTHOR{Frank Mittelbach}
18 %\usepackage{fixltx2e}
20 \newcounter{foo}[subsection]
21 \newcounter{bar}[foo] \renewcommand\thebar{\thefoo-\arabic{bar}}
22 \newcounter{baz}[bar] \renewcommand\thebaz{\thebar-\arabic{baz}}
23 \newcounter{foobar}[section]
26 \typeout{\thesection\space | \thesubsection\space | \thefoo\space | \thebar\space | \thebaz\space | \thefoobar}
29 \stepcounter{subsection}\stepcounter{subsection}
30 \setcounter{foo}{5}\stepcounter{foo}
31 \setcounter{foobar}{2}\stepcounter{foobar}
32 \setcounter{bar}{6}\stepcounter{bar}
35 \typeout{\thesection\space | \thesubsection\space | \thefoo\space | \thebar\space | \thebaz\space | \thefoobar}
38 \stepcounter{subsection}
40 \typeout{\thesection\space | \thesubsection\space | \thefoo\space | \thebar\space | \thebaz\space | \thefoobar}