4

Why are the slides from appendix not numbered with letters?

Is there a solution?

Thank you for your help

\documentclass{beamer}
\begin{document}

\section{test1}
\begin{frame}{\insertsectionnumber.~\insertsection}
 bal bla
\end{frame}

\appendix

\section{test2}
\begin{frame}{\insertsectionnumber.~\insertsection}
 bla bla
\end{frame}

\end{document}
0

1 Answer 1

3

This is so, because \insertsectionnumber is defined as (in the file beamerbasesection.sty)

\def\insertsectionnumber{\@arabic\c@section}

And \appendix doesn't change this;

\newcommand<>\appendix{%
  \only#1{\part{\appendixname}
  \addtocontents{nav}{\protect\headcommand{\protect\beamer@appendixpages{\the\c@page}}}}}

so the counter will appear using arabic representation.

You can change this, redefining \insertsectionnumber in the proper location:

\setcounter{section}{0}
\renewcommand\insertsectionnumber{\Alph{section}}

Perhaps you want to let \appendix do this change:

\documentclass{beamer}

\makeatletter
\renewcommand<>\appendix{%
\setcounter{section}{0}%
\renewcommand\insertsectionnumber{\Alph{section}}%
  \only#1{\part{\appendixname}
  \addtocontents{nav}{\protect\headcommand{\protect\beamer@appendixpages{\the\c@page}}}}}
\makeatother

\begin{document}

\section{test1}
\begin{frame}{\insertsectionnumber.~\insertsection}
 bal bla
\end{frame}

\appendix

\section{test2}
\begin{frame}{\insertsectionnumber.~\insertsection}
 bla bla
\end{frame}

\end{document}
1
  • What does the <> do in \renewcommand<>{\appendix{…}}? Is that a beamer-ism? (I'd expect it to mean an overlay specification in the body of the document, but am not sure how to make sense of it in the preamble.)
    – LSpice
    Jul 17, 2022 at 19:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .