1

Beamer infolines themes, like CambridgeUS, insert the titles of the current section and subsection in the headline. These titles appear to be clickable (the screen pointer changes as if they were so) but nothing happens when one clicks them.

Is there a way to link the headline titles to the first frame of the corresponding section or subsection? Something like this already works on the theme footline: clicking on the presentation title takes you to the title page.

Edit: MWE

\documentclass{beamer}
\usetheme{CambridgeUS} 
\setbeamertemplate{navigation symbols}{}
\title{Click on Headline}
\author{A.~U.~Thor}
\institute{X-University}
\date{2015}
\begin{document}
\begin{frame}
  \titlepage
\end{frame}
\begin{frame}[t]{Contents}
  \tableofcontents[subsectionstyle=hide] 
\end{frame}
\section{Section 1}
\begin{frame}{Section 1}
  \centering \Large Section 1
\end{frame}
\begin{frame}[t]{Section 1: Contents}
  \tableofcontents[currentsection,hideothersubsections]
\end{frame}
\subsection{Subsection 1.1}
\begin{frame}{Frame 1.1.1}
  A frame of subsection 1.1
\end{frame}
\begin{frame}{Frame 1.1.2}
  Another frame of subsection 1.1
\end{frame}
  \subsection{Subsection 1.2}
\begin{frame}{Frame 1.2.1}
  A frame of subsection 1.2
\end{frame}
\begin{frame}{Frame 1.2.2}
  Another of subsection 1.2
\end{frame}
\section{Section 2}
\begin{frame}{Section 2}
  \centering \Large Section 2
\end{frame}
\begin{frame}[t]{Section 2: Contents}
  \tableofcontents[currentsection,hideothersubsections]
\end{frame}
\subsection{Subsection 2.1}
\begin{frame}{Frame 2.1.1}
  A frame of subsection 2.1
\end{frame}
\end{document}
  • 1
    I am guessing you are viewing a pdf? What pdf viewer are you using? – jonalv Mar 13 '15 at 16:23
  • 1
    @Carlos i'm able to reproduce your problem now using adobe acrobat on a windows system. the same pdf file works for me using evince on a linux system. – aeroNotAuto Mar 13 '15 at 16:29
  • 1
    @Carlos i also just tried the same exact pdf using evince portable on the same windows system acrobat x didn't work on, and it works with evince. has this always been a problem with beamer/adobe? i feel like i've encountered problems with that combination before. – aeroNotAuto Mar 13 '15 at 16:35
  • 1
    @Carlos aaaaand now i've been able to reproduce your problem with evince on both windows and linux machines, but it only fails in presentation mode. obviously this doesn't help you much... – aeroNotAuto Mar 13 '15 at 16:47
  • 1
    @Carlos check back later, i'm sifting through beamerbasenavigation.sty and beamerbasesection.sty to see if i can redefine something like they did here. i'm certainly not great with this though, so if somebody with more experience is willing to pick this up, it'll go faster... – aeroNotAuto Mar 13 '15 at 17:38
5

This is a bug in beamer and will be fixed in the next release. In beamerbasesection.sty you'll find the rather long definition for \beamer@section. It has

\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}%

This means that when the hyperlink is inserted it refers to the current page, not the first page of the section. The code should read

\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}%

This forces \the\c@page to expand to it's value (the LaTeX idiom here should really be \thepage). With that change and a similar one for subsections everything works as it should.

For the present, a fix can be applied using \patchcmd

\documentclass{beamer}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\beamer@section}
  {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
  {\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}}
  {}{}
\patchcmd{\beamer@subsection}
  {\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
  {\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}}
  {}{}
\makeatother
% etc.
1

Can you post a MWE of your code that doesn't do anything? With this example

\documentclass{beamer}
    \usetheme{CambridgeUS}
    \title{My Title}
    \author{Me}
    \institute{University of Me}
    \date{The Future}
\begin{document}
\begin{frame}
    \titlepage
\end{frame}
\begin{frame}{Outline}
    \tableofcontents
\end{frame}
\section{Section}
\subsection{Subsection}
\begin{frame}{Test}
\end{frame}
\section{Section2}
\subsection{Subsection2}
\begin{frame}{Another Test}
\end{frame}
\end{document}

clicking the title in the footline brings you to the table of contents, and clicking 'Section' or 'Subsection' advances you to the slide 'Another Test'. Do you not see this behavior?

  • Thanks for the answer; I have added a MWE to the question. I tried your code without success: clicking on the headline titles has no effect. – Carlos Mar 13 '15 at 16:08
  • @Carlos when i try your mwe it works just like mine, no problem on my system. my log says i'm using pdfTeXk 3.141592-1.40.3 and beamer development version 3.10 a...what are yours? – aeroNotAuto Mar 13 '15 at 16:13
  • I'm using pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9) (preloaded format=pdflatex 2013.3.23) and Beamer 3.33 – Carlos Mar 13 '15 at 16:21

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.