josephwright / beamer

A LaTeX class for producing presentations and slides
Other
1.44k stars 143 forks source link

appendixframenumber does not work with frame numbers #875

Closed jolars closed 10 months ago

jolars commented 10 months ago

It seems like the appendixframenumber option to the page number in head/foot template has no effect when it is used together with the frame number option of the footline template. Here is a working example:

\documentclass{beamer}

\setbeamertemplate{page number in head/foot}[appendixframenumber]
\setbeamertemplate{footline}[frame number]

\begin{document}

\begin{frame}
  \frametitle{A Slide Before the Appendix}
\end{frame}

\appendix

\begin{frame}
  \frametitle{A Slide In the Appendix}

  This slide is in the appendix and is (incorrectly?) counted towards the total number of main frames.
\end{frame}

\end{document}

The first slides looks like this:

image

But I would expect the frame numbering to be 1/1 here, not 1/2.

The last slide looks like this:

image

The frame numbering is 2/2 but I would expect it to be 2/1.

If I use \setbeamertemplate{footline}[page number] instead, then it works as expected (I get 1/1 and 2/1), but I would assume that this would work when using frame numbers also. I am using beamer 3.69.

samcarter commented 10 months ago

With an up-to-date beamer version it works if you first set the footline template and then adjust the page number in head/foot template to your liking:

\documentclass{beamer}

\setbeamertemplate{footline}[frame number]
\setbeamertemplate{page number in head/foot}[appendixframenumber]

\begin{document}

\begin{frame}
  \frametitle{A Slide Before the Appendix}
\end{frame}

\appendix

\begin{frame}
  \frametitle{A Slide In the Appendix}

  This slide is in the appendix and is (incorrectly?) counted towards the total number of main frames.
\end{frame}

\begin{frame}
  \frametitle{A Slide In the Appendix}

  This slide is in the appendix and is (incorrectly?) counted towards the total number of main frames.
\end{frame}

\end{document}

document-1

jolars commented 10 months ago

If you mean that changing the order of the commands would matter, then I think not. And I already tried it. I still get 1/3, 2/3, and 3/3.

samcarter commented 10 months ago

Changing the order works with beamer v3.70 or newer. And yes, the order of the commands does matter because \setbeamertemplate{footline}[frame number] will set the page number in head/foot and thus overwrite what you previously set.

jolars commented 10 months ago

Changing the order works with beamer v3.71. And yes, the order of the commands does matter because \setbeamertemplate{footline}[frame number] will set the page number in head/foot and thus overwrite what you previously set.

Alright, thanks! I couldn't find anything in the changelog regarding this so I figured it bug would still be around. Okay, thanks again!