Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
1  
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 at 14:29

1 Answer 1

up vote 5 down vote accepted

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}

share|improve this answer
    
Thanks very much! I'll vote your answer up when (if) I get to 15 reputation points. –  skepticaleye Jul 22 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 at 14:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.