[Tex/LaTex] Hyperref problems in Beamer when using notes

beamerhyperrefnotes

Update and MWE added

I'm working with Beamer for the first time, and I want to use notes pages to prompt myself. However, when I turn them on, either by using either \documentclass[notes]{beamer} or \setbeameroption{show notes on second screen=left}, most items that should produce a hyperlink, e.g. sections, citations, section links, produces pdflatex errors to the effect of destination with the same identifier has already been used.

The following is a MWE example, which I'm compiling with MikTeX 2.9 (with recently updated packages) on Windows 7. You can see there are several different ways I might want to incorporate notes. In this MWE, options 2-4 give warnings and bad links, while in my full document, option 1 does as well. In this MWE, if I add a bibliography using BibTeX, option 1 will then give link errors on the citations as well.

% In this MWE, options 2-4 all cause hyperlink problems. In my full presentation, option 1 does as well. 
% The only one that works is option 5, which had no notes in any form. 

%% 1. DUAL-DISPLAY NOTES:
%\documentclass[hyperref={bookmarks=false}]{beamer}
%\usepackage{pgfpages}
%\setbeameroption{show notes on second screen=left}

% 2. NOTES ON SEPARATE SLIDES:
\documentclass[notes]{beamer}

% 3. NOTES ONLY:
%\documentclass[notes=only]{beamer}

% 4. HANDOUTS:
%\documentclass[handout,notes]{beamer}

% 5. NO NOTES: ONLY ONE THAT BUILDS WITHOUT WARNINGS
%\documentclass[hide notes]{beamer}

\mode<presentation>{
  \usetheme{Warsaw}
  \setbeamercovered{transparent}
}

\usepackage[latin1]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}

\title[Pres\hspace{2em}\insertframenumber/
\inserttotalframenumber]{My Presentation}
\author[Me Me] {Me}
\institute[Univ.]{University}
\date[Sep. 14, 2011]{September 14$^{\text{th}}$, 2011}

% Makes TOC show at beginning og each section:
\AtBeginSubsection[]
{
  \begin{frame}<beamer>{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
    \note{}
}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}
\note{}

\begin{frame}{Outline}
  \tableofcontents
\end{frame}
\note{}

\section{Introduction}

\begin{frame}{A content frame }
\begin{itemize}[<+->]
        \item Here is some content.
                \note[item]{And here is a related note.}
        \item More content.
                    \note[item]{Another note. }
        \item Yet more content.
                    \note[item]{Yet again a note.}
\end{itemize}
\end{frame}

\begin{frame}{A second content frame}
\begin{itemize}
        \uncover<1->{
        \item Indented content:
        \begin{itemize}
                \item First piece.
                \note[item]<1->{Note about first piece. }
        \end{itemize}
        }
        \uncover<2->{
        \item More content.
        \begin{itemize}
                \item More indented content.
                \note[item]<2-> {Note about this second piece of content. }
        }
        \end{itemize}
\end{itemize}
\end{frame}

\end{document}

My question is, is it possible to have working hyperlinks when using note pages, or does the inherent modifications to the page numbering by addition of notes preclude this? I'm hoping I've just loaded some packages in the wrong order or something here.

Update

As per percusse's answer below, for options 2-4, the problem is fixed by using the newer notes options, e.g. show notes instead of just notes, as follows:

%% 1. DUAL-DISPLAY NOTES:
%\documentclass[hyperref={bookmarks=false}]{beamer}
%\usepackage{pgfpages}
%\setbeameroption{show notes on second screen=left}

% 2. NOTES ON SEPARATE SLIDES:
\documentclass[show notes]{beamer}

% 3. NOTES ONLY:
%\documentclass[show only notes]{beamer}

% 4. HANDOUTS:
%\documentclass[handout,show notes]{beamer}

% 5. NO NOTES: ONLY ONE THAT BUILDS WITHOUT WARNINGS
%\documentclass[hide notes]{beamer}

However, they persist with Option 1 (dual-display). This seems related to the mini slide that gets inserted in the upper-right of the notes page; apparently that mini slide has duplicates of the labels in the main slide. One solutions for this is to use show notes on second screen=right instead so the right slide gets the broken links and the left one (presentation slide) gets working ones.

Another partial solution that removes the warnings is to remove that mini-slide from the notes pages in beamerouterthemedefault.sty by removing the following lines under \defbeamertemplate*{note page}{default}:

  \hfill\insertslideintonotes{0.5}\hskip-\Gm@rmargin\hskip0pt%
  \vskip-0.25\paperheight%
  \nointerlineskip

Then, Option 1 compiles with no warnings, but the various navigation links in the presentation slide (e.g. outline at top of slides, navigation keys at bottom right) still do not work.

So, my updated (refined) question is, is it possible to build with the option \setbeameroption{show notes on second screen=left} and still have working links in the presentation slides?

Best Answer

I have tried all options and as it complains, you are simply using obsolete versions of the notes option and make sure that you compile twice to be sure about the warnings. The cases below are fully working without any errors or warnings on Win7 64bit, Texniccenter 2 Alpha3, Miktex 2.9.

% 2. NOTES ON SEPARATE SLIDES:
\documentclass[show notes]{beamer}

% 3. NOTES ONLY:
\documentclass[show only notes]{beamer}

% 4. HANDOUTS:
\documentclass[handout,show notes]{beamer}

I have tried adding new sections and everything (hyperlinks etc.) looks working. I have used the example bibliography on page 102 of the manual (v.3.12) and it is also working without any errors and mistakes. Please edit your question further if you feel that there is still something that does not work.

Here is what I have used, just in case:

%% 1. DUAL-DISPLAY NOTES:
%\documentclass[
                                                        %hyperref={bookmarks=false}
                                                        %]{beamer}
%\usepackage{pgfpages}
%\setbeameroption{show notes on second screen=left}

% 2. NOTES ON SEPARATE SLIDES:
\documentclass[show notes]{beamer}

% 3. NOTES ONLY:
%\documentclass[show only notes]{beamer}

% 4. HANDOUTS:
%\documentclass[handout,show notes]{beamer}

% 5. NO NOTES: ONLY ONE THAT BUILDS WITHOUT WARNINGS
%\documentclass[hide notes]{beamer}

\mode<presentation>{
  \usetheme{Warsaw}
  \setbeamercovered{transparent}
}

\usepackage[latin1]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}

\title[Pres\hspace{2em}\insertframenumber/
\inserttotalframenumber]{My Presentation}
\author[Me Me] {Me}
\institute[Univ.]{University}
\date[Sep. 14, 2011]{September 14$^{\text{th}}$, 2011}

% Makes TOC show at beginning og each section:
\AtBeginSubsection[]
{
  \begin{frame}<beamer>{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
    \note{}
}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}
\note{}

\begin{frame}{Outline}
  \tableofcontents
\end{frame}
\note{}

\section{Introduction}

\begin{frame}{A content frame }
\begin{itemize}[<+->]
        \item Here is some content.
                \note[item]{And here is a related note.}
        \item More content.
                    \note[item]{Another note. }
        \item Yet more content.
                    \note[item]{Yet again a note.}
\end{itemize}
\end{frame}

\begin{frame}{A second content frame}
\begin{itemize}
        \uncover<1->{
        \item Indented content:
        \begin{itemize}
                \item First piece.
                \note[item]<1->{Note about first piece. }
        \end{itemize}
        }
        \uncover<2->{
        \item More content.
        \begin{itemize}
                \item More indented content.
                \note[item]<2-> {Note about this second piece of content. }
        }
        \end{itemize}
\end{itemize}
\end{frame}
\section{Section 2}
\begin{frame}
\begin{block}{citation}it cites \cite{Salomaa1973}\end{block}
\end{frame}
\subsection{Subsection1}
\begin{frame}
\begin{block}{block1}content 1\end{block}
\end{frame}
\subsection{Subsection2}
\begin{frame}
\begin{block}{block 2}content 2\end{block}
\end{frame}

\begin{frame}
\begin{thebibliography}{Dijkstra, 1982}
\bibitem[Salomaa, 1973]{Salomaa1973}
A.~Salomaa.
\newblock {\em Formal Languages}.
\newblock Academic Press, 1973.
\bibitem[Dijkstra, 1982]{Dijkstra1982}
E.~Dijkstra.
102
\newblock Smoothsort, an alternative for sorting in situ.
\newblock {\em Science of Computer Programming}, 1(3):223--233, 1982.
\end{thebibliography}
\end{frame}
\end{document}

EDIT: It turns out that I did not try it with option 1 afterwards. I was able to reproduce the warnings. I will try to see if I can come up with something.

EDIT2: I have switched the location of the presentation and the notes and at least it works as it should. The problem I am guessing is that hyperref only defines hyperlinks for the part on the left and then when creating that small minipage at the corner of the notes, it gets confused since they are defined already on the body of the presentation.

\documentclass[hyperref={bookmarks=false}]{beamer}
\usepackage{pgfpages}
\setbeameroption{show notes on second screen=left}

this still gives you the warning but the presentation works fine.

Related Question