16

I came to this question after looking for a way to explicitly end a \part (as described in this question: https://stackoverflow.com/questions/1483396/how-to-explicitly-end-a-part-in-latex-with-hyperref)

Using \bookmarksetup{startatroot} worked perfectly, but now I'm not sure if there is a reason for loading hyperref or bookmark first.

According to this post: Which packages should be loaded after hyperref instead of before? bookmark should be loaded after hyperref. However, is this always the case?

Any ideas how it should really be?

Mario S. E.
  • 18,609

3 Answers3

16

bookmark loads hyperref since it uses some of the code contained within it. As such, it is sufficient to only load bookmark. Since loading of hyperref is included in bookmark, load order doesn't matter.

Werner
  • 603,163
13

Next to the answer of Werner I want to point to the example of the documentation. There the package bookmark is loaded after hyperref. So you can setup options for hyperref separat. However related to the documentation it's important to load hyperref without disabling the bookmarks.

Although bookmarks loads hyperref I prefer the loading of hyperref separat. The preamble is much clearer and you know what is loaded and why.

Marco Daniel
  • 95,681
5

from the documentation:

2\documentclass{article}
3 \usepackage{xcolor}[2007/01/21]
4 \usepackage{hyperref}
5 \usepackage[
6   open,
7   openlevel=2,
8   atend
9 ]{bookmark}[2011/12/02]
10
11 \bookmarksetup{color=blue}
   ....