13

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}.)

Martin Scharrer
  • 262,582
equaeghe
  • 5,976
  • 4
  • 30
  • 36

1 Answers1

17

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}
Ulrike Fischer
  • 327,261
  • 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