TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to add a bookmark to the table of contents. This page shows a method, but \pdfbookmark is not recognised as a command. This is my document header:


I'm compiling the document with TexMakerX's PDFLaTeX option.

share|improve this question
Welcome to TeX.sx! Please add a full but minimal working example (MWE) that illustrates your problem. – Martin Scharrer Jan 16 '12 at 13:19

This works for me.





Some text

Notice that the pdftex options should not be used, as it is supplied automatically when the LaTeX engine used is pdftex. Moreover hyperref should generally be loaded last, with some exception; one of the exceptions is bookmark that eases bookmark management (and is not strictly necessary).

The \cleardoublepage is redundant in the example, but is necessary if some copy precedes the table of contents to ensure the correct correspondence of the bookmark with the text.

share|improve this answer

The bookmark package seems to be a powerful and customizable solution, but for most (of my) applications, one usually needs to add the bookmark at or below the current level. For this it is sufficient to use what hyperref provides, namely \belowpdfbookmark{text}{name} and \subpdfbookmark{text}{name}.

As described here: http://ftp.math.purdue.edu/mirrors/ctan.org/macros/latex/contrib/hyperref/doc/manual.html#x1-150004.1

share|improve this answer
Loading the package bookmark has also the advantage, that the bookmarks are faster uptodate, often one run is sufficient, hyperref needs two runs. – Heiko Oberdiek Oct 31 '12 at 9:21
@HeikoOberdiek, good to know. Do you mean that you need a smaller number of compilation? I think I noticed that. Is this true even if you use the plain hyperref commands? – alfC Oct 31 '12 at 14:27
Yes (and more text to make a comment). – Heiko Oberdiek Oct 31 '12 at 14:29
I found it useful to use both \belowpdfbookmark{text}{contents} and \pdfbookmark{other text}{contents} -- without this, having two \pdfbookmarks in my text was causing both of them to be listed on "page 1". – Joe Corneli Aug 18 '13 at 18:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.