3

I have seen several PDF documents which, when opened in adobe acrobat, gives bookmarks to every chapter, section and subsection in the left pane. Is there any easy way to generate such PDF files with LaTeX? I have an about 100 page document in report class. How do I modify the code to get bookmarks like that?

yo'
  • 51,322
Della
  • 385
  • 4
  • 19

1 Answers1

4

The hyperref package with option bookmarksopen=true can achieve what you want:

\documentclass{report}
\usepackage{lipsum} % random texts
\usepackage{hyperref}
\hypersetup{bookmarksopen=true}

\begin{document}
\section{Section 1}
\lipsum[1]
\section{Section 2}
\lipsum[1]
\section{Section 3}
\lipsum[1]
\end{document}
Herr K.
  • 17,946
  • 4
  • 61
  • 118
  • 1
    Better to load hyperref last in your preamble. – Herr K. Nov 28 '13 at 15:09
  • thanks a lot. Any way to remove the red boxes around the text, even though I know they don't appear on the printout. I am not sure whether it is just because of my university document class or something else. – Della Nov 29 '13 at 04:05
  • @Barman: Use option colorlinks, and use linkcolor=..., citecolor=..., urlcolor=... to set colors of various links. – Herr K. Nov 29 '13 at 04:08