[texhax] LaTeX help
Prof. Sudhir R. Ghorpade
srg at math.iitb.ac.in
Tue Aug 5 20:49:12 CEST 2003
Dear Robin,
Thanks for your kind reply. Your remarks (isn't forbidden ...)
provided the clues I needed. I just added a simpler title for
the sake of List of Figures:
\caption[Simpler Title]{The same complicated stuff with array}
and there isn't a problem any more.
It seems to me that this is a better option than using \protect
etc. as advised in the FAQ.
Thanks again,
Sudhir
On Tue, 5 Aug 2003, Robin Fairbairns wrote:
> 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
> \protect\begin instead.
>
> > 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
>
More information about the texhax
mailing list