# [texhax] LaTeX help

Robin Fairbairns Robin.Fairbairns at cl.cam.ac.uk
Tue Aug 5 15:34:42 CEST 2003

messages to support at tug.org are automatically forwarded to texhax; see
details in the footer copy i've retained for your benefit.

> In my LaTeX file I have inserted a figure within the
> \begin{figure} ....   \end{figure}
> and using the command \includegraphics to include my EPS file(s).
> I tried to give the following caption:
> --------------------------------------------------------------------
>  \caption{Graphs of (i) $f(x):= |x|$ and
> (ii) $f(x):= \left\{ \begin{array}{ll} x + 2 & \mbox{ if} \ x \le 1, \\ > x^2 - 1 & \mbox{ if} \ x > 1; \end{array} \right.$}
> --------------------------------------------------------------------
> However, while compiling, I get the following error message:
>  --------------------------------------------------------------------
> Argument of \@caption has an extra }.
> <inserted text>
>                 \par
> l.1404 ...mbox{ if} \ x > 1; \end{array} \right.\$}
> --------------------------------------------------------------------
> I know for sure that there is no extra brace.

there's an answer in the faq about precisely the error message you
have.  in your case, the fragile command is \begin ==> use

> Nevertheless it is annoying to have this error message. Can you tell
> me how to avoid it? Could it be because the array environment (and the
> \\ comand to go to next line) is forbidden within \caption?

\\ isn't forbidden, it just doesn't work: the nearest to "forbidding"
\\ is the failure to do anything to make it work.  what should it do
in the list of figures, for example.

> TeX FAQ: http://faq.tug.org/
> TeX newsgroup: http://groups.google.com/groups?group=comp.text.tex
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/interest.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org