0

How can one get rid of the hyperref warning about the $ signs in the subsection title that are generated in the following minimal example?

\documentclass{book} 
\usepackage{titlesec}            
\usepackage{titletoc}                
%\newcommand{\subsecformat}[1]{\parbox[b]{\linewidth}{
%    \normalsize\selectfont
%    \filright\textcolor{black}{\textsc{#1}}}}    
\usepackage{hyperref}

\begin{document}
\subsection{Can light move faster than $c$?}
No.
\end{document}

Probably the command \subsecformat needs to be improved. How should this be done?

  • 1
    This has nothing to do with titlesec. Use \texorpdfstring{$c$}{c} or ignore the warning. By the way, defining \subsecformat does exactly nothing. – egreg Jan 20 '15 at 18:29
  • Just for completeness, the answer is to write \texorpdfstring{$c$}{c} in the title, in order to get the PDF bookmarks right. – Motion Mountain Jan 22 '15 at 9:57

Browse other questions tagged or ask your own question.