I'm not sure if I've phrased the title correctly, but let me try to explain:

I have my tex file basically organized as follows:

    \input chap1
    \input chap2

Each chapter input begins with \chapter{name}. Everything is nice in the Table of Contents as far as chapter numbers; yet, the "sidebar navigation" in the pdf displays incorrectly. The first two chapters after the first are shown nested in the first.

I've noticed I can resolve this by setting \setnumber{chapter}{1} before \input chap1, but this messes up the TOC to start chapter numbering at 2. This of course then leads me to try \setnumber{chapter}{0}, which then resolves the TOC, but messes up the navigation hierarchy. This bubble pops up somewhere else every time I push it down. Images of the two cases:



Min. working example:




    \input 1-...
    \input 2-...
    \input 3-...
    \input 4-...
    \input 5-...
    \input 6-...


I should note lastly, that the only difference between the first chapter and others is that it does not contain any sections. Noting this, I tried adding some sections. This did not change the problem.

Any help is appreciated!


I've updated the above to a new minimal working example. I've tossed the thesis template class as that was too hairy to try to debug. I noticed a duplicate equation label in the input 4, and removed it. I also added the bookmark package as suggested. One, some, or all of these changes fixed the issue.

closed as off-topic by Paul Gessler, Jesse, Masroor, Adam Liter, Guido Sep 12 '14 at 4:52

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    don't set chapter by hand, the numbers should resolve if you latex the document again – David Carlisle Sep 11 '14 at 15:56
  • Unfortunately, the issue was present before using \setcounter{chapter}, and this was just my lack-of-knowledge attempt at fixing it. Removing \setcounter{chapter} reverts to the nested sidebar chapters in the first picture. – Chester Sep 11 '14 at 16:03
  • I can't compile your MWE with sectsty package due to an error: Command \partfont already defined. ...{0}\SS@titlepart\SS@makeulinepartchap#1}} but without that package I cannot reproduce your problem. TOC works fine. My chapter include files contained just \chapter{abc} \lipsum and TOC numbering was correct. See if something in the include files messes up the TOC. Maybe post one of them stripped to the bare minimum? – ajeh Sep 11 '14 at 16:40
  • It looks that either some of your \input files or your thesis template screws up the pdf bookmark levels. This is not solvable as neither the thesis template nor the content of the files input are known to us – user31729 Sep 11 '14 at 18:19
  • 4
    This question appears to be off-topic because it was solved using an unknown combination of suggestions in the comments. – Paul Gessler Sep 12 '14 at 3:59

Browse other questions tagged or ask your own question.