# How to create PDF file with all your bookmarks displayed?

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

\documentclass[12pt]{book}
\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 (-).

I hope let me understand.

• Please provide a minimal example demonstrating the issue. It should begin \documentclass and end \end{document}. – cfr Jan 18 '16 at 22:46
• 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 '16 at 23:36
• \usepackage[open]{bookmark} – egreg Jan 18 '16 at 23:38
• @cfr Thanks. My tex file compiles perfectly. All bookmarks are open. :) – mathsalomon Jan 18 '16 at 23:41
• @cfr Yes. It works. Just put \usepackage [pdfstartview=FitH]{hyperref} Many Thanks. – mathsalomon Jan 19 '16 at 0:17

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{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}

• And to open first X levels only use bookmarksopenlevel=X. – Michael Oct 4 at 11:56

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

whereas the simple open option will show