Cleveref and pdf Bookmark
I'm afraid there is no solution for this, apart from using the command \texorpdfstring
, that is you have to specify what has to go in the text and what has to go in the bookmarks.
Hence, substitute
\section{Proof to \Cref{some label}}
with
\section{Proof to \texorpdfstring{\Cref{some_label}}{Theorem \ref{some_label}}}
Note that it isn't a good idea to have label names with spaces, so I've substituted some label
with some_label
.
MWE:
\documentclass{article}
\usepackage{hyperref}
\usepackage{cleveref}
\newtheorem{theorem}{Theorem}
\begin{document}
\section{Section 1}
\begin{theorem}\label{some_label}
This is a theorem.
\end{theorem}
\section{Proof to \texorpdfstring{\Cref{some_label}}{Theorem \ref{some_label}}}
\end{document}
Output:
The \Cref
command cannot be used in \section
when bookmarks are being produced; however, \autoref
works (it's less powerful, though). For a simple application like this you can do as follows:
\documentclass{article}
\usepackage{hyperref}
\usepackage{cleveref}
\pdfstringdefDisableCommands{\let\Cref\autoref}
\newtheorem{theorem}{Theorem}
\begin{document}
\section{Section 1}
\begin{theorem}\label{some_label}
This is a theorem.
\end{theorem}
\section{Proof to \Cref{some_label}}
\end{document}