I’m using a feature of beamer that shows notes beside slides, but the page numbers that are coming out are crazy, making it impossible to extract specific slides into other documents with \includegraphics[page=n]{presentation.pdf}
.
For example, in this MWE, there are two frames that are each 1 slide, and then one frame that is four slides. The PDF page labels that show up in Acrobat are, as indicated, 2, 3, 3, 3, 3, and 7. It starts at page 2 instead of 1, and then there are four page 3s, but they don’t even all belong to the same frame!
\documentclass{beamer}
\usepackage{pgfpages}
\setbeameroption{show notes on second screen=left}
\setbeamertemplate{note page}{frame \insertframenumber \\ \insertnote}
\def\pg#1{pgfpages says this is page #1 but it is really page \arabic{page}}
\begin{document}
\setcounter{page}{0}
\frame{hi \note{\pg{2}}}
\frame{there \note{\pg{3}}}
\frame{how \pause are \pause you \pause today
\note<1-3>{\pg{3}}
\note<4>{\pg{7}}}
\end{document}
Here’s what the output looks like:
I know that the manual says, “pgfpages will produce wrong page numbers in the .aux file” and gives a manual workaround. But the page
counter still works, so shouldn’t there be some way to pass that through to the PDF? I’d like to fix this, but don’t know where to start. Specifically, when the manual says that “TeX instantiates the page numbers when writing an .aux file only when the physical page is shipped out,” what exactly is it talking about? Where is the source code for that?
\documentclass[hyperref={pdfpagelabels=false}]{beamer}
, so then the PDF viewer has to display the actual page numbers rather than the onepgfpages
appears to use.