I'm using the hyperref package with a custom class, and I'm having a problem with hyperref not creating the tree correctly. What I expect to see is this:
+ Section 1 ++ Section 1.1 ++ Section 1.2 +++ Section 1.2.1 +++ Section 1.2.2 ++ Section 1.3 + Section 2 ++ Section 2.1
But what I'm seeing instead is this:
+ Section 1 ++ Section 1.1 ++ Section 1.2 +++ Section 1.2.1 +++ Section 1.2.2 ++++ Section 1.3 +++++ Section 2 ++++++ Section 2.1
I am guessing there is some kind of level counter that keeps track of what level of section, subsection, subsubsection, etc. the tree is on, and this just isn't being reset when I run
\clearpage or when I create a chapter or section header. But I don't know how to reset it, and I don't know what kind of mechanism hyperref uses to keep track of this. I've been unable to figure out how hyperref does this on my own.
How can I control hyperref's level "counter" from the Latex class level?
Any help would be greatly appreciated.