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.

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've encountered an unusual problem with the animate package and the use of math delimiters, like \left\{.

When compiling the MWE, I get the error Missing delimiter (. inserted). on the math line.

But: if I change the order -- putting the math line before animategraphics line -- it compiles with no problem.

Is there a known conflict between animategraphics and the later use of delimiters? Any thoughts about how to overcome this?


share|improve this question
As of version 2014/08/06 of animate, the problem seems to be solved. – egreg Aug 7 '14 at 10:07
up vote 5 down vote accepted

It is a bug in animate. The macro \@anim@@sanitize is executed several times, one for each token in the list .:;?!/"'*+,->=<$&@][)(^_|~`, and each time it does


The first time, \@anim@leftbrace saves the meaning of \{, but the second time it just saves the meaning of \@anim@lbr. Later, \@anim@endsanitize does \global\let\{=\@anim@leftbrace, restoring the wrong value.

The same happens for \\, \} and \%.

You can cure the bug by doing the loop in a different way:


    \expandafter\xdef\csname @anim@\number\expandafter`\next\endcsname{%
    \global\catcode\expandafter`\next=\csname @anim@\number\expandafter`\next\endcsname





This should be brought to the attention of the package maintainer as soon as possible.


As of version 2014/08/06 of animate, the problem has been fixed along with the other bug noted in comments.

share|improve this answer
Thank you very much, @egreg. I will try to incorporate this asap. – AlexG Aug 6 '14 at 7:31
I found another way for fixing it. I moved the lines with \global\let from the recursive macros \@anim@@sanitize and \@anim@@endsanitize to the ends of the calling macros \@anim@sanitize and \@anim@endsanitize. – AlexG Aug 6 '14 at 9:01
@AlexG I don't understand why you want to use your own baked recursive call, when LaTeX provides \@tfor. But the package is yours. ;-) – egreg Aug 6 '14 at 9:03
I just find recursive macro calls cool. Though without really mastering them ;). – AlexG Aug 6 '14 at 9:06
@AlexG I'd also point out that globally redefining \\ is not really the best thing to do; if \animategraphics is called in a flushleft or center environment, one will end up with \\ having the wrong definition when the environment ends. Do you really need \global? – egreg Aug 6 '14 at 9:15

use instead of \{ the macro \lbrace:

\[ \left\lbrace ....
share|improve this answer
What about \\? Sorry, but this just cures one of the symptoms. – egreg Aug 2 '14 at 15:47

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.