[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#344790: [Micha Feigin] Re: Bug#344790: hyperref: off by 1 error with pdf bookmarks and tocdepth



--- Begin Message ---
On Tue, 27 Dec 2005 20:27:45 +0100
Frank Küster <frank@debian.org> wrote:

> Micha Feigin <michf@post.tau.ac.il> wrote:
> 
> > hyperref uses tocdepth to decide the depth of the bookmarks generated
> > from the document sections. The problem is that with documents that
> > don't have a chapter section this causes an off by one error.
> >
> > Setting tocdepth to 1 to have only sections in the table of contents
> > causes no bookmarks to be generated instead of generating bookmarks only
> > for sections.
> >
> > setting tocdepth to 2 shows sections and subsections but only sections
> > show in the bookmarks.
> 
> I tried to reproduce this, but failed.  Can you provide a small minimal
> example that shows the problem?  For how to create a minimal example,
> see the explanation in the bugreport you posted:
> 

I attached a sample file. If you change the tocdepth value from 1 to 2 the
bookmarks are one level behind the table of contents (for tocdepth=2 table of
contents shows subsections but bookmarks only sections, tocdepth=1 shows
sections in toc and nothing in bookmarks).

For some reason exporting from lyx produces more erratic results, tocdepth=1
gives nothing in bookmarks (same as regular latex) but tocdepth=2 results with
subsections in bookmarks instead of just sections). I also attached the lyx
file just in case.

> > If your example file isn't short or produces more than one page of
> > output (except when multiple pages are needed to show the problem),
> > you can probably minimize it further. Instructions on how to do that
> > can be found at
> >
> > http://www.latex-einfuehrung.de/mini-en.html (english)
> >
> > or 
> >
> > http://www.latex-einfuehrung.de/mini.html (german)
> 
> Regards, Frank
> -- 
> Frank Küster
> Inst. f. Biochemie der Univ. Zürich
> Debian Developer
> 
>  
>  +++++++++++++++++++++++++++++++++++++++++++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
> 


 
 +++++++++++++++++++++++++++++++++++++++++++
 This Mail Was Scanned By Mail-seCure System
 at the Tel-Aviv University CC.
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass beamer
\begin_preamble
\usetheme{Warsaw}
% or ...
  
\setbeamercovered{transparent}
% or whatever (possibly just delete it)
\end_preamble
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 1
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 2
\tocdepth 2
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout BeginFrame

Outline
\layout Standard


\begin_inset LatexCommand \tableofcontents{}

\end_inset 


\layout Section

Section 1
\layout Subsection

Subsection 1
\layout BeginFrame

frame 1
\layout Standard

something
\layout EndFrame

\the_end
\documentclass{beamer}

\setcounter{tocdepth}{1}
\usetheme{Warsaw}
  
\begin{document}

\begin{frame}
\frametitle{frame 1}
\tableofcontents

\end{frame}
\section{section 1}
\subsection{subsection 1}

\begin{frame}
\frametitle{frame 1}

something

\end{frame}

\end{document}

--- End Message ---

-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer

Reply to: