How to prevent a bookmark entry in PDF file, for a numbered section included in table of contents?
I wanted to use \section{test}, to have a numbered section, and with an entry into TOC; but I'd like to remove the automatic bookmark entry in pdf file.
Asked
Active
Viewed 950 times
5
Martin Schröder
- 15,156
1 Answers
7
You can globally turn off bookmarks with \usepackage[bookmarks=false]{hyperref} in the preamble.
To turn it off temporarily, see: How to temporarily disable PDF bookmarking ?
Code from there:
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\section{A}
\hypersetup{bookmarksdepth=-2}
\section{B}
\hypersetup{bookmarksdepth}%back to tocdepth
\section{C}
\end{document}
-
Thanks, for me I had to set the second command to \hypersetup{bookmarksdepth=1} to make it work again. – Jun 15 '18 at 09:00