This seems to me like a possibly common problem, the solution of which is probably already been posted somewhere, unfortunately I'm not quite sure what key words i should use to find it.
Anyway, to the problem: Something like this
\subsubsection{Spin-orbit coupling \( ciao \) }
will not usually pose a problem. However when i try to create a table of content with the
\tableofcontents
command i get the following error:
\contentsline {subsubsection}{\numberline {5.1.2}Spin-orbit coupling \relax $ ciao \relax \GenericError { }{LaTeX Error: Bad math environment delimiter}{See the LaTeX manual or LaTeX Companion for explanation.}{Your command was ignored.\MessageBreak Type I <command> <return> to replace it with another command,\MessageBreak or <return> to continue without it.}}{8}{subsubsection.5.1.2}
The table of contents seems to not be the problem by itself, because when i do not use commands as the one shown above everything works fine.
Strangely enough, i can actually solve the problem by using instead of \( stuff \) the alternative $stuff$.
Now, is this supposed to work this way? or is it some sort of bug? or (more likely) am i doing something wrong?
\(and\)are not robust. If you add\usepackage{fixltx2e}the error should disappear (you might need to compile twice or delete thetocfile first). – cgnieder May 10 '13 at 08:48