Beamer: \appendix to add extra slides produces warning: Token not allowed in a PDF string

I am re-running an old Beamer presentation with TexLive 2017, and the command \appendix produces a warning that it did not use to produce, though it does work properly:

Token not allowed in a PDF string (Unicode):(hyperref) removing \translate '

See the following MWE. How can I get rid of that warning? Thanks!

\documentclass{beamer}

\usepackage{appendixnumberbeamer}

\mode<presentation> {
\usetheme{AnnArbor}
\usecolortheme{wolverine}
}

\begin{document}

\begin{frame}
slide 1
\end{frame}

\begin{frame}
slide 2
\end{frame}

\begin{frame}
slide 3
\end{frame}

\appendix %do not count the following slides for the total number

\begin{frame}
extra slide 1
\end{frame}

\begin{frame}
extra slide 2
\end{frame}

\end{document}

• – user36296 Jul 9 '18 at 8:38
• please not that \appendix is not from the appendixnumberbeamer package, but from beamer itself – user36296 Jul 9 '18 at 8:39
• Isn't it? It only works when I add \usepackage{appendixnumberbeamer}... So there is not a fix at the moment? Many thanks! – DaniCee Jul 9 '18 at 8:41

Workaround:

\renewcommand{\appendixname}{\texorpdfstring{\translate{Appendix}}{Appendix}}


In fact, if your beamer version is resonable up-to-date, you don't need the appendixnumberbeamer to modify the frame numbering but you can use \setbeamertemplate{page number in head/foot}[appendixframenumber]

\documentclass{beamer}

%\usepackage{appendixnumberbeamer}

\mode<presentation> {
\usetheme{AnnArbor}
\usecolortheme{wolverine}
}

\renewcommand{\appendixname}{\texorpdfstring{\translate{Appendix}}{Appendix}}

\begin{document}

\begin{frame}
slide 1
\end{frame}

\begin{frame}
slide 2
\end{frame}

\begin{frame}
slide 3
\end{frame}

\appendix %do not count the following slides for the total number

\begin{frame}
extra slide 1
\end{frame}

\begin{frame}
extra slide 2
\end{frame}

\end{document}

• I am not able to make it work with my custom theme (while \usepackage{appendixnumberbeamer} + \appendix does work, despite the warning)... Is there anything known to clash with it that I might be loading in my theme? I get no errors or warnings, it just does not work with my theme (as in numbering goes from the first to the very last slide) – DaniCee Jul 9 '18 at 9:11
• @DaniCee It depends on the definition of your footline. If it uses page number in head/foot template it will work, otherwise not. But this is entirely unrelated to your appendix+warning problem. – user36296 Jul 9 '18 at 9:17
• OK it does work perfect without warnings if I do \usepackage{appendixnumberbeamer} instead of \setbeamertemplate{page number... and then \renewcommand{\appendixname...` – DaniCee Jul 9 '18 at 9:21