TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a PDF file created with WinEdt 9 (see picture 1). The tex source file is made with class book, obviously generator bookmarks.

enter image description here

\documentclass[12pt]{book}
\usepackage[colorlinks=true,linkcolor=blue,urlcolor=black]{hyperref}
\usepackage{bookmark}
\begin{document}
\chapter{Chapter [One}
\section{Section two}
\subsection{Section one}
\subsection{Section two}
\section{Section three}
\subsection{Section one}
\subsection{Section two}
\section{Section four}
\subsection{Section one}
\subsection{Section two}
\subsection{Section three}
\end{document} 

Whenever compiled using PDFLaTeX always have to deploy each of the bookmarks labeled (+). And that is annoying when there are many subgroups (so to speak) of bookmarks with (+).

Specifically: I want to know if there is any code that you can add to the preamble of my tex file so that the resulting PDF output by default as in picture 2, with bookmarks (+) fully deployed (-).

enter image description here

I hope let me understand.

Thanks in advance for your help.

share|improve this question
    
Please provide a minimal example demonstrating the issue. It should begin \documentclass and end \end{document}. – cfr Jan 18 at 22:46
1  
Try bookmarksopen=true. My viewer ignores it, along with the bookmarks default for showing them at all. But presumably acroread should respect it. (I would test but acroread takes half a year to even think about possibly considering opening something, so I figure it will be quicker for you if you're already using it.) – cfr Jan 18 at 23:36
1  
\usepackage[open]{bookmark} – egreg Jan 18 at 23:38
1  
@cfr Thanks. My tex file compiles perfectly. All bookmarks are open. :) – mathsalomon Jan 18 at 23:41
1  
@cfr Yes. It works. Just put \usepackage [pdfstartview=FitH]{hyperref} Many Thanks. – mathsalomon Jan 19 at 0:17
up vote 3 down vote accepted

Simply add bookmarksopen=true for the default bookmarks-open to also expand them. I will refrain from posting a screenshot as my viewer ignores all these options anyway and acroread simply takes forever to even consider possibly thinking about sometime in the distant future opening a file. (But the OP confirmed that it works in Adobe's viewer.)

\documentclass[12pt]{book}

\usepackage[colorlinks=true,linkcolor=blue,urlcolor=black,bookmarksopen=true]{hyperref}

\usepackage{bookmark}

\begin{document}

\chapter{Chapter [One}
\section{Section two}
\subsection{Section one}
\subsection{Section two}
\section{Section three}
\subsection{Section one}
\subsection{Section two}
\section{Section four}
\subsection{Section one}
\subsection{Section two}
\subsection{Section three}

\end{document}
share|improve this answer

According to the documentation of bookmark you can use the open option; if you want to set the level, you can say openlevel=<level>; so

\usepackage[open,openlevel=1]{bookmark}

will show something like

enter image description here

whereas the simple open option will show

enter image description here

Tested with Skim and Adobe Reader on Mac OS X.

share|improve this answer
    
Thanks This is most useful. But he had already voted by the method of user cfr. Thank you anyway. – mathsalomon Jan 19 at 0:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.