Take the 2-minute tour ×
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.

The following code is in the preamble of my LaTeX document:

\documentclass{llncs}
\usepackage{amsmath,amssymb}
\usepackage{url}
\usepackage[algoruled,vlined]{algorithm2e}
\usepackage{graphicx,subfigure}


\usepackage{hyperref} 
\hypersetup{colorlinks=true,citecolor=blue}


\numberwithin{equation}{section} % numbering according to the section
\bibliographystyle{plain}  %Choose a bibliograhpic style
\begin{document}

\title{The Title}
\maketitle
\section{A}
\label{sect:A}
\subsection{a}
\subsection{b}
% ...
\section{B}
\label{sect:B}
\subsection{a}
\subsection{b}
% ...
\section{C}
\label{sect:C}
\subsection{a}
\subsection{b}
% ...
\end{document}

Note that the text is organized into sections and subsection. However, after compiling the code, the Adobe PDF preview does not show the "tree" branching on the left. Instead, it just shows "The Title", and that option has no branching with the "+/-" sings. How could I achieve this?

share|improve this question
    
Please always add a full but minimal working example (MWE) that illustrates your problem and makes it possible to recreate it. I added some dummy \sections and \subsections here. Please have a look if it is right. –  Martin Scharrer Apr 18 '12 at 11:03
    
The llncs class can be found at springer.com/computer/lncs?SGWID=0-164-6-793341-0 if someone wants to compile the example. –  Martin Scharrer Apr 18 '12 at 11:05
    
Thanks. I edited to emphasize that the \label is also used. So? –  boy Apr 18 '12 at 11:15
    
1  
See also No PDF bookmarks when using llncs class for other possible problems with llncs –  egreg Apr 18 '12 at 12:29
add comment

1 Answer

up vote 6 down vote accepted

The llncs class sets tocdepth to 0. This setting controls which sectioning commands end up in the Table-Of-Contents (TOC), which is also used by hyperref for the PDF bookmarks depth by default. You need to set the bookmarksdepth manually to a higher value (higher means more deeper sectioning commands are included). An alternative is to raise tocdepth again, but this also affects the \tableofcontents command, which might be unwanted.

Here are correctly working example:

\documentclass{llncs}
\usepackage[bookmarks,bookmarksopen,bookmarksdepth=2]{hyperref}
\title{The Title}
\author{the author}
%\setcounter{tocdepth}{2}%  alternative (2 or higher)
\begin{document}
\maketitle
\section{A}
\label{sect:A}
\subsection{a}
\subsection{b}
% ...
\section{B}
\label{sect:B}
\subsection{a}
\subsection{b}
% ...
\section{C}
\label{sect:C}
\subsection{a}
\subsection{b}
% ...
\end{document}

A list of all depth numbers for the sectioning commands can be found in How to show subsections and subsubsections in TOC?

share|improve this answer
    
Works, thanks. It was the \setcounter{tocdepth}{3} command. –  boy Apr 18 '12 at 11:39
    
@boy: Note that I updated the answer. Using bookmarksdepth=2 (or higher) does it also and might be better. –  Martin Scharrer Apr 18 '12 at 11:40
add comment

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.