TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following code


which is failing with this error:

ERROR: Extra }, or forgotten \endgroup.

--- TeX said ---
\endsa@boxit ...dvarwidth \color@endgroup \egroup 

l.8 }

Can you help me figure out what is happening?

share|improve this question
Related question about multiple frames / animation which accepted answer also uses standalone. – Martin Scharrer Mar 6 '12 at 10:46
up vote 4 down vote accepted

You are using ignorerest which tells standalone to ignore everything outside the image environments. This also includes the \multido line, which is not what you want. The rest is ignored by storing it inside a box which is never used. This adds a group around everything after \begin{document} and the \begin{image}, i.e. the \multido line which triggers the error. You need to simply remove the ignorerest option. Also add % after \begin{image} to avoid a space there. Then it works fine for me.

share|improve this answer
@MarinScharrer: I removed ignorerest and it worked! Thanks – Mário Feb 25 '12 at 16:18
@Mário: Because \multido seems to be used often I now implemented a multido option for the standalone class which will wrap the content automatically in a multi environment and also ensures that ignorerest is supported with it. It will be part of the next release. – Martin Scharrer Jan 5 '13 at 9:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.