I have trouble with my thesis document. The sidebar table of contents (when opening in a pdf viewer) has a wrong ordering. Even though chapter 1 and chapter 2 are on the same hierarchical plane in the sidebar pdf toc chapter 2 is under chapter 1 (and chapter 3 and all other chapters are under chapter 2).

The normal table of contents in the document is fine. I think it has something with bookmarks (which I'm not 100% sure what they are).

After I fix a mistake in my latex document and latex doesn't compile fully. The next compile ends with the error:

Runaway argument?

{\376\377\0002\000.\0005\000.\0001\000\040\000R\000o\000t\000a\000t\0\ETC. ./thesis.tex:293 (which is \begin{document}: File ended while scanning use of \@@BOOKMARK.

trashing the aux file clears that and the next compile is fine again (the ordering of the pdf toc is still messed up).

How do I debug that? I can't really disable packages as they are tightly integrated. Any suggestions are welcome.

  • There is a missing parenthesis in a macro where its contents is also set as a bookmark. However, I suppose yor thesis will be printed. Why do you then need hyperref? – user2478 Aug 16 '11 at 9:07

The bookmarks are the things in the sidebar. The runaway error probably means that one of your \chapter etc command contains something which breaks when hyperref tries to put it in the bookmark. Inspect the aux and the out file. Perhaps you can find the culprit. Or put \end{document} in the middle of your document and then move it around until you find the point where the error appears.

  • Answer: There were a couple of problems and one of them or the combination of them solved it. Glossaries should not be referred to in captions even with \glsentryname. For multiple appendices I used \begin{appendices} and \end{appendices}. Both of these combined and the bookmarks work again. – Wolfgang Kerzendorf Aug 16 '11 at 10:19
  • You can try to protect fragile commands with \protect\gls.... Or use \texorpdfstring: tex.ac.uk/cgi-bin/texfaq2html?label=texorpdf – Ulrike Fischer Aug 16 '11 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.