Package loading order with hyperref
The hyperref package documentation says: “Make sure it comes last of your loaded packages”. The reason is that it redefines many LaTeX commands. It’s a rule of thumb that helps to avoid errors.
However, there are exceptions, for instance the amsrefs user’s guide notes that amsrefs has to be loaded after hyperref. Many others are documented in section 6 of the hyperref
README.
To avoid problems when adding hypertext functionality, here is a list of exceptions, that is, a list of packages which have to be loaded after hyperref, instead of before hyperref:
cleveref
amsrefs
float
beforehyperref
beforealgorithm
chappg
sidecap
linguex
minitoc
geometry
: From the User manual: Withmag <> 1000
, notruedimen
andhyperref
,hyperref
should be loaded beforegeometry
. Otherwise the resulted PDF size will become wrong.robustindex
hypdestopt
,hypcap
,hypbmsec
hypernat
attachfile
showframe
,showidx
(which disables the\href
s in the index but in this loading order at least documents compile at all)uri
,pageslts
,regstats
refcheck
bookmark
glossaries
apacite
Probably also further packages with \RequirePackage{hyperref}
. A quick search in TeX Live 2011 resulted in this list:
amsrefs
attachfile2
bugtracker
(part ofpgfplots
)classicthesis
doi
dtx-style
(part ofthuthesis
)eforms
exerquiz
hypgotoe
insdljs
ltxdockit
opcit
prerex
rec-thy
tdclock
toptesi
ydoc-code
andydoc-desc
(both part ofydoc
; note, thatydoc-doc
contains\hypersetup
without loadinghyperref
) )
Packages with \RequirePackage[<some option(s)>]{hyperref}
:
beamerbasearticle
bidituftehyperref
chextras
cmpj
dtk-pdf
easy-todo
hep
hrefhide
ifmslide
lstdoc
ocgtools
pdfcomment
pdfscreen
pdfx
rvdtx
strukdoc
ucshyper
This list was created on TeX.SE with the help of Lev Bishop, Stephen, Geoffrey Jones, Simon, Werner, and Stijn Hoop.