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.

I've got the following problem. When clicking on a section in a presentation using hyperref, I'm not brought to the page itself, but a little bit below. What could be causing this? enter image description here

MWE as follows.

\documentclass[xcolor=dvipsnames]{beamer}
\usepackage{hyperref}
\usepackage{color}
\title[]{MWE}
\begin{document}
\section{VAA}
\begin{frame}
\titlepage
\end{frame}
\section{John Doe}
\begin{frame}[t]{Slide 1}
\end{frame}
\begin{frame}[t]{Slide 1}
\end{frame}
\begin{frame}[t]{Slide 1}
\end{frame}
\end{document}
share|improve this question
1  
The screenshot looks like PDF bookmarks which are created by sections, but your MWE has different sections! Which PDF viewer do you use? –  Joseph Wright Mar 31 '12 at 5:52
    
BTW: You don't have to load hyperref explicitly, as this is already done by beamer. –  diabonas Mar 31 '12 at 14:16
    
@JosephWright, I use Okular. Yes, my MWE has different sections. I used a picture of my complete document but then cut out everything that was unnecessary for the MWE –  EricR Mar 31 '12 at 14:38

1 Answer 1

up vote 1 down vote accepted

This is most likely a viewer issue: Compiling your MWE with pdfLaTeX, this is the link position of the bookmark VAA I get in the resulting PDF file:

% 10 0 obj
<<
/D [18 0 R /XYZ 28.346 272.126 null]
>>

Converting the coordinates 28.346 272.126 given in PostScript points to centimetres yields a position of (1cm, 9.6cm) relative to the lower left corner of the paper, which is exactly 1cm to the right of the upper left corner (as the default beamer papersize is 12.8cm x 9.6cm). This shift is due to the page margins set by the document class.

So the bookmark should take you a little bit more to the right at most, but not lower than expected as you describe.

Anyway, if this really bugs you, you can try replacing the destination of the bookmark with a direct reference to the page anchor, which should take you exactly to the upper left corner. This can be done by patching the internal commands producing the bookmarks:

\documentclass[xcolor=dvipsnames]{beamer}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\beamer@part}{Outline\the\c@part}{page.\the\c@page}{}{}
\patchcmd{\beamer@section}{Outline\the\c@part.\the\c@section}{page.\the\c@page}{}{}
\patchcmd{\beamer@subsection}{Outline\the\c@part.\the\c@section.\the\c@subsection.\the\c@page}{page.\the\c@page}{}{}
\patchcmd{\beamer@subsubsection}{Outline\the\c@part.\the\c@section.\the\c@subsection.\the\c@subsubsection.\the\c@page}{page.\the\c@page}{}{}
\makeatother
\title[]{MWE}
\begin{document}
\section{VAA}
\begin{frame}
\titlepage
\end{frame}
\section{John Doe}
\begin{frame}[t]{Slide 1}
\end{frame}
\begin{frame}[t]{Slide 1}
\end{frame}
\begin{frame}[t]{Slide 1}
\end{frame}
\end{document}

I don't know if it's worth the effort, however - after all, presentations are normally given in full screen mode where bookmarks are often not available. Furthermore, beamer itself offers excellent navigation features like hyperlinked headlines, which are much more elegant in use than most viewer's built-in functions.

share|improve this answer
    
Cheers diabonas. It looks like a viewer issue, you're right. I've been testing it in other viewers. However, I'm having trouble with beamer's excellent navigation features. The navigate sections buttons don't behave exactly how I expect them to. I have three slides for three sections. They don't work on the first slide, on the second slide forward they work fine, moving 3 slides (2,5,8). Moving backwards, it goes from (8,7,4,1). Thus, I thought about using the "bookmarks" –  EricR Mar 31 '12 at 14:47
    
@EricR Sounds weird... Can you give a MWE for this behaviour, possibly as a new question? Maybe it's a beamer issue that can be fixed. –  diabonas Mar 31 '12 at 16:33

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.