# Hyperref - Token not allowed [duplicate]

Possible Duplicate:
Hyperref warning - Token not allowed in a PDF string

The following code:

\subsection{The classes $\mathcal{L}(\gamma)$}


generates the errors:

Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                removing math shift' on input line 1938.

Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                removing \gamma' on input line 1938.

Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                removing math shift' on input line 1938.


What do I have to do to keep \gamma in the subsection, so that it is also listed in the table of contents?

-

## marked as duplicate by Werner, Jake, Gonzalo Medina, Mico, ThorstenApr 27 '12 at 5:58

The easiest method to avoid the warnings is to use \texorpdfstring:
\subsection{The classes \texorpdfstring{$\mathcal{L}(\gamma)$}{Lg}}
`