1

Error is:

Argument of \@secondoftwo has an extra }.
<inserted text> 
                \par 
l.4 ...{$g(x)$} of the form \texorpdfstring{$ax$}}

MWE to get the error is:

\documentclass{article}
\usepackage{hyperref}
\begin{document}  
\subsubsection{With \texorpdfstring{$g(x)$} of the form \texorpdfstring{$ax$}}
\end{document}  

Note:

I "solved" the error by placing a dot immediately after the \texorpdfstring command (why does it work?, I have no idea, I just was lucky), it's like if \texorpdfstring is waiting for an argument to end.

Solved error:

\documentclass{article}
\usepackage{hyperref}
\begin{document}  
\subsubsection{With \texorpdfstring{$g(x)$} of the form \texorpdfstring{$ax$}.}
\end{document}  
4

hyperref takes the text for bookmarks from the arguments of commands like \section, which can contain things like math, colors, or font changes, none of which will display in the pdf bookmarks as is.

Correct \texorpdfstring syntax is

\texorpdfstring{TEXstring}{PDFstring}
  • 1
    You will also see that in your "working" example in the question, the o in of is missing from the PDF, as \texorpdfstring grabs that as it's second argument. – Torbjørn T. Jul 19 '15 at 7:07
  • @TorbjørnT. That is right, not really noticeable though, thanks so much for making that point stand out. – Hans Jul 19 '15 at 7:14

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.