I would like to put a \rulecommand inside a caption. Classical solution is supposed to be \protect{} but that's not working. I still get Error: Argument of \@caption has an extra }. Why?

Here is a minimum example. (using MiKTeX 2.9 on XP)

        \caption{\protect{ \rule{.6em}{.2ex} }}
  • 6
    \protect\rule not \protect{ Commented Oct 8, 2013 at 9:30

1 Answer 1


\protect does not take a {} argument: it must immediately precede the token it is protecting so


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .