11

I'm forced to use a third-party document class that somewhat messes up the bookmarking done by hyperref (and the bookmark package): a spurious bookmark appears for 'author' (so I guess the package implements 'author' using a sectioning macro). Therefore, I would like to be able to disable bookmarking temporarily, in my case before the \maketitle command, and reenable it afterwards.

Is this possible using hyperref, or the bookmark package. (I'm currently using the latter to partly overcome the problem, using \bookmarksetup{startatroot}.)

  • Please add a minimal example that illustrates your problem. – Matthew Leingang Mar 15 '11 at 12:43
  • @Matthew: Ulrike pre-empted me and at the same time removed the dependence on the third-party document class; a really concise and to the point answer. – equaeghe Mar 15 '11 at 17:11
14

You could change bookmarksdepth:

\documentclass{article}
\usepackage{hyperref}
\begin{document}
\section{A}

\hypersetup{bookmarksdepth=-2}
\section{B}

\hypersetup{bookmarksdepth}%back to tocdepth

\section{C}

\end{document}
  • Wow @ulrike-fischer! It works like a charm! I used it to hide erroneousLoT, LoF bookmark entries that began appearing after I added both lists' entries to the ToC. Thanks! – Amar Sep 30 '16 at 16:36

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.