LaTeX bookmarks not creating proper tree structure

1.9k views Asked by At

When created a LaTeX document, using automated bookmarking from hyperref, the pdf bookmarks aren't in a proper tree structure. It only increases bookmarks tree depth never decreasing it.

Should be like:

Part I
=Section 1
==Subsection 1.1
==Subsection 1.2
=Section 2
==Subsection 2.1
Part II
=Section 1
==Subsection 1.1

and now its:

Part I
=Section 1
==Subsection 1.1
==Subsection 1.2
==Section 2
===Subsection 2.1
===Part II
====Section 1
=====Subsection 1.1

thus making everything linked to Part I as a root of the tree, instead of each part being a different root.

Any reason why it could be like this? and how to deal with it?

1

There are 1 answers

0
Golob On BEST ANSWER

Ok, after reading alot of documentation I found that to solve the problem, bookmark package with its \bookmarksetup{startatroot} command should be used. And indeed it works.