The error you report is related to an attempt by hyperref
to create a bookmark (the links in the left sidebar in most PDF viewers). It is undoubtedly related to the fact that hyperref
doesn't recognize \widetilde
and thus can't put it into a bookmark.
What you need to do is translate the math expression to a \textorpdfstring{$...$}{<text equivalent>}
.
To borrow David Carlisle's very nice explanation, here's what's necessary to make a bookmark. LaTeX needs to make plain text with no typesetting commands. It doesn't know what to do with \widetilde
so it drops most of the commands in that math string, and complains. If you use \texorpdfstring{$\xxx$}{zzz}
, LaTeX doesn't bother to attempt the conversion. It simply typesets $\xxx$
in the main document and puts zzz
in the bookmark.
$
but from the commands that you have between them, since you have neither shown your input nor the error message that you got it is hard to help but my guess would be that you have an old latex and you need to use\protect
in front of some commands such as\sqrt
hyperref
to create a bookmark. It is undoubtedly related to the fact that\widetilde
is not recognized in this context. What you need to do is translate the math expression to a\texorpdfstring{$...$}{<text equivalent>}
. There are other questions here that might give useful information.\texorpdfstring{$abc$}{zzz}
latex does not attempt the conversion at all, it typesets$abc$
in the main document and uses the supplied textzzz
in the bookmark