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:
\documentclass[a4paper]{report}
\usepackage[pdftex,bookmarks=true]{hyperref}
\usepackage[pdftex]{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{array}
I'm compiling the document with TexMakerX's PDFLaTeX option.
Best Answer
This works for me.
Notice that the
pdftex
options should not be used, as it is supplied automatically when the LaTeX engine used ispdftex
. Moreoverhyperref
should generally be loaded last, with some exception; one of the exceptions isbookmark
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.