9

To use a footnote in a section one has to use the protect keyword to avoid an error... then when using the hyperref package you get another error:

Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                removing `\@ifnextchar' on input line 105.

With MWE:

\documentclass{book}

\usepackage{hyperref}
\scrollmode


\begin{document}

\chapter{test}
\section{Test Section\protect\footnote{my footnote}}
asdfasdfsadf


\end{document}

Any ideas how to fix this?

12

One way is to use optional argument for section like:

\section[Test section]{Test Section\footnote{my footnote}}

Then you don't have to protect anything.

| improve this answer | |
9

Use \texorpdfstring in your section title as follows:

\documentclass{book}

\usepackage{hyperref}
\scrollmode

\begin{document}

\chapter{test}
\section{\texorpdfstring{Test Section\protect\footnote{my footnote}}{Test Section}}
asdfasdfsadf

\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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