Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have the following code

\documentclass[multi={image},crop,ignorerest]{standalone}%
\usepackage{multido}
\begin{document}
\multido{\iframe=1+1}{2}{
\begin{image}
\iframe
\end{image}
}
\end{document}

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.