# hyperref warning caused by Beamer appendix

The code below results in the following warning: "Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): removing '\translate' on input line 16."

(Note: line 16 is the blank line immediately following \appendix.)

This warning occurs even if I remove the supplemental slide and leave \appendix as the last line before \end{document}. The warning does not occur if I remove the appendix entirely. The .pdf file produced is apparently correct, but I'd like to be able to include an appendix without encountering the warning.

I looked through the previously answered questions and found references to the \texorpdfstring command, but I couldn't seem make it work in this case. Has anyone found a solution, or can anyone point me to a previously answered question that I may have missed? Thanks!

\documentclass{beamer}
\title{The Title}
\author{The Author}
\begin{document}

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

\section{First Section}
\begin{frame}\frametitle{First Section}
This is a slide.
\end{frame}

\appendix

\section{Appendix}
\begin{frame}\frametitle{Supplemental Material}
This is a supplemental slide.
\end{frame}

\end{document}

-
The problem is the definition of \appendix in beamerbasesection.sty which uses \part{\appendixname} and \appendixname is defined in beamerbasemisc.sty as \translate{Appendix}. –  Gonzalo Medina Jul 22 '14 at 14:29

You can work around this warning by using

\documentclass{beamer}
\title{The Title}
\author{The Author}

\renewcommand\appendixname{Appendix}

\begin{document}

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

\section{First Section}
\begin{frame}\frametitle{First Section}
This is a slide.
\end{frame}

\appendix

\section{Appendix}
\begin{frame}\frametitle{Supplemental Material}
This is a supplemental slide.
\end{frame}

\end{document}


EDIT

The Reason for the warning was explained in @Gonzalo Medina's comment

The problem is the definition of \appendix in beamerbasesection.sty which uses \part{\appendixname} and \appendixname is defined in beamerbasemisc.sty as \translate{Appendix}

-
Thanks very much! I'll vote your answer up when (if) I get to 15 reputation points. –  skepticaleye Jul 22 '14 at 14:35
If you want to, you can add to your answer the reason for the warning (I gave it in a comment to the question). –  Gonzalo Medina Jul 22 '14 at 14:37