}
'??You've looked at your LaTeX source and there's no sign of a misplaced
}
on the line in question.
Well, no: this is TeX's cryptic way of hinting that you've put a fragile command in a moving argument.
For example, \
footnote
is fragile, and if we put that in the
moving argument of a \
section
command, as
we get told\section{Mumble\footnote{I couldn't think of anything better}}
The same happens with captions (the following is a simplification of a comp.text.tex post):! Argument of \@sect has an extra }.
giving us the error message\caption{Energy: \[e=mc^2\]}
The solution is usually to use a robust command in place of the one you are using, or to force your command to be robust by prefixing it with! Argument of \@caption has an extra }.
\
protect
, which in the \
section
case would show as
In both the\section{Mumble\protect\footnote{I couldn't think of anything better}}
\
section
case and the \
caption
case, you can
separate the moving argument, as in
\
section[
moving]{
static}
; this gives us another standard
route - simply to omit (or otherwise sanitise) the fragile command
in the moving argument. So, one might rewrite the \
caption
example as:
for, after all, even if you want display maths in a caption, you surely don't want it in the list of figures.\caption[Energy: $E=mc^2$]{Energy: \[E=mc^2\]}
The case of footnotes is somewhat more complex; "footnotes in LaTeX section headings" deals specifically with that issue.
This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=extrabrace