9

Does anyone know how to hyperref the title page of a pdf file? I mean I want my title to appear as the highest level in the bookmaks and the sections will be the next level etc so that the bookmark will look like a tree with branches. Only the sections appear at the moment and stand on their own. Thank you.

8

I usually do this:

\begin{document}

\makeatletter
\pdfbookmark[0]{\@title}{title}
\makeatother

\maketitle

This uses the title defined by the \title command but you can use something else (then the \makeatletter and \makeatother are not needed).

0
3

Another solution is to use the bookmark package. This can be implemented in the following way:

At the top of your title-page code you put the command \hypertarget{TitlePage}{}. This creates the target/label your bookmark will point towards.

Then, insert your code for the title page.

After the \maketitle command you simply add \bookmark[dest=TitlePage]{Title Page}.

For my thesis, I made a separate file for my title page and used the titlepage environment, then included that file into the core .tex document like this:

\hypertarget{TitlePage}{}
\include{TitlePage}
\bookmark[dest=TitlePage]{Title Page}

The bookmark package offers a number of other interesting features, including formatting commands for the bookmarks. One that I found interesting for a thesis is the numbered format that can be loaded as a package option. This option adds the numbers of chapters/sections/subsections to the bookmarks.

1
  • Thanks for pointing out that \hypertarget-command. I've been looking for that for ages.
    – Bram
    Aug 15 '19 at 12:59

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.