[pracjourn-forum] For the error list
Peter Flynn
pflynn at ucc.ie
Wed Dec 20 10:37:27 CET 2006
Peter Flom wrote:
> Here's a good one.....I figured it out.
>
> Try leaving the \ off when you have a figure
>
> that is try something like
>
> begin{figure}
> \includegraphics{figure.eps}
> \end{figure}
>
> The error message is a lot of jargon and then
> Too many }
>
> If you try the infamous h, you get a message that such booboss are
> usually harmless.
>
>
> So, when you're missing a \ but have the right number of { and } the
> error is that you have too many }
Very good one. What happens is that begin{figure} gets set as normal
text (which is it, of course), then the image gets inserted, and then
the \end{figure} starts doing its stuff -- which includes terminating
all the things that ought to have been started by \begin[figure}, which
includes an \egroup to end the group that should have been keeping all
the figure contents together (started by a \bgroup in \begin[figure}):
> <figure.eps>
> ! Too many }'s.
> \@endfloatbox ...pagefalse \outer at nobreak \egroup
> \color at endbox
> l.6 \end{figure}
which is the equivalent of a closing curly brace, which it counts as
one too many.
I guess environments should really set their name as the "current thing
being processed", so that the moment \end{foo} is seen, LaTeX should
check that "foo" is indeed the current environment, and therefore OK to
close. If not, it should say somethng like "Can't end a figure that
hasn't yet been begun".
///Peter
More information about the pracjourn-forum
mailing list