Page Layouthyperref | Remove Bookmarks Bar in PDF Viewer

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
niles
Posts: 92
Joined: Mon Dec 01, 2008 9:35 pm

hyperref | Remove Bookmarks Bar in PDF Viewer

Post by niles »

Hi

Please see

Code: Select all

\documentclass[10pt, a4paper]{article} 
\usepackage[T1]{fontenc}
\usepackage{amsfonts, amsmath, amssymb, amsfonts}
\usepackage[english]{babel}
\usepackage[ansinew]{inputenc}
\usepackage[]{hyperref}
\hypersetup{
    bookmarks    = false,            % show bookmarks bar?
    unicode      = false,            % non-Latin characters in Acrobat’s bookmarks
    pdftoolbar   = false,             % show Acrobat’s toolbar?
    pdfmenubar   = true,             % show Acrobat’s menu?
}

\begin{document} 
\tableofcontents
\section{asd}
\subsection{asds}
\begin{align}
asd \label{dsa}
\end{align}
(\ref{dsa})
\cite{asddd}


\end{document}
I am trying to remove the "booksmarks"-bar when I open my PDF in Adobe. Even though I have set "bookmarks" to false, it still pops up. Am I missing something here?

Cheers,
Niles.
Last edited by niles on Tue Sep 27, 2011 8:08 pm, edited 3 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

hyperref | Remove Bookmarks Bar in PDF Viewer

Post by localghost »

Now and then you should listen to the compiler. You get a clear warning in the log file.

Code: Select all

Package hyperref Warning: Option `bookmarks' has already been used,
(hyperref)                setting the option has no effect on input line 12.
But the remedy is not so obvious. And the hyperref manual doesn't give information on that (at least I couldn't find it). The warning says that this option has already been used. So I just tried to give it directly as option to the package instead of setting it later by the \hypersetup command. Et voilà, I get the desired result with the below example.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage{babel}
\usepackage{blindtext}
\usepackage[bookmarks=false]{hyperref}

\hypersetup{%
  unicode   =false,    % non-Latin characters in Acrobat’s bookmarks
  pdftoolbar=false,    % show Acrobat’s toolbar?
  pdfmenubar=true      % show Acrobat’s menu?
}

\begin{document}
  \tableofcontents

  \blinddocument
\end{document}
This might also apply to other options.


Thorsten
niles
Posts: 92
Joined: Mon Dec 01, 2008 9:35 pm

hyperref | Remove Bookmarks Bar in PDF Viewer

Post by niles »

localghost wrote:Now and then you should listen to the compiler.
Haha, this will be my motto from now on! So true.

It works, thanks!
niles
Posts: 92
Joined: Mon Dec 01, 2008 9:35 pm

Re: hyperref | Remove Bookmarks Bar in PDF Viewer

Post by niles »

Hmm, I think I must have misunderstood something. Because booksmarks=false doesn't create bookmarks, hence the tab is not visible at startup. I want the bookmarks to be created, but the tab should remain closed at startup.

Do you know if that is possible? I couldn't seem to find the appropriate parameter in the manual.

Cheers.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

hyperref | Remove Bookmarks Bar in PDF Viewer

Post by localghost »

Then you will have to use the »bookmarksopen« option. See Section 3.5 of the hyperref manual.
niles
Posts: 92
Joined: Mon Dec 01, 2008 9:35 pm

hyperref | Remove Bookmarks Bar in PDF Viewer

Post by niles »

localghost wrote:Then you will have to use the »bookmarksopen« option. See Section 3.5 of the hyperref manual.
Wow, you are fast. I tried with your MWE, and it didn't work. The tab still shows on startup.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: hyperref | Remove Bookmarks Bar in PDF Viewer

Post by localghost »

Hm, that's odd. I can comprehend this. But I can't offer a solution.
niles
Posts: 92
Joined: Mon Dec 01, 2008 9:35 pm

Re: hyperref | Remove Bookmarks Bar in PDF Viewer

Post by niles »

Thanks for taking the time to look at it.
Post Reply