2

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?

  • 6
    Have a look at hyperref or bookmark. – Johannes_B Nov 28 '13 at 13:24
  • Basically, just loading \usepackage{hyperref} as the last package before \begin{document} should do the job. And you should use pdflatex, not latex+dvips+pspdf or latex+dvipdfm. – yo' Nov 28 '13 at 15:05
3

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}
  • 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 4:05
  • @Barman: Use option colorlinks, and use linkcolor=..., citecolor=..., urlcolor=... to set colors of various links. – Herr K. Nov 29 '13 at 4:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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