Bookmarks and Hyperref

The hyperref package allows your LaTeX document to be built with PDF bookmarks and hyperlinks for the table of contents, figures and equations.

First, include the hyperref package with any options:

\usepackage[pdftex,bookmarksopen=true,colorlinks=true,plainpages=false,pdfpagelabels]
{hyperref}

Options include:

  • pdftex – tell hyperref that we’re using pdflatex.
  • bookmarksopen=true – the list of bookmarks should be shown automatically when opening the document in a PDF viewer.

Note: The hyperref package must be the last package included in your documents preamble or it may not work correctly. It must come after all other packages, even if those packages appear unrelated!

In addition to this, the finer details of the hyperref package are configured using the hypersetup command:

\hypersetup{
  pdfauthor = {Chris Cantwell},
  pdftitle = {PhD Thesis},
  pdfsubject = {Mathematics},
  pdfkeywords = {Transient Growth, Convective instability, CFD},
  pdfcreator = {LaTeX with hyperref package},
  pdfproducer = {pdflatex},
  linkcolor = DarkRed,
  citecolor = Blue,
}

Note the colours specified here must be first defined and require the color package:

\usepackage{color}
\definecolor{DarkRed}{rgb}{0.25,0,0}
\definecolor{Blue}{rgb}{0,0,0.75}
\definecolor{Black}{rgb}{0,0,0}

The three numbers specify red, green and blue (RGB) and have the range [0,1].

Article last modified on January 26, 2014 at 4:02 pm.

Leave a Reply

Your email address will not be published.