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

The following is a minimal non-working example of a reference to some label within a caption while using the autonum package.


    E = mc^2 \label{eq::label}

    y \caption{ \ref{eq::label} }


Upon compiling I get the following errors:

! Argument of \@caption has an extra }.
! Paragraph ended before \@caption was complete.

I get the same result, if I refer to, say another figure, instead of an equation.

How can I avoid this error?

share|improve this question
up vote 5 down vote accepted

Use \protect

share|improve this answer
That works, thank you. – sirinac Sep 3 '12 at 14:51
Thanks for highlighting the problem. I just uploaded version 0.3.2 which contains the fix. So the user supplied \protect is not needed with that version anymore. It may take some time until 0.3.2 has propagated via CTAN. – Patrick Häcker Sep 3 '12 at 20:43

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.