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 code does not compile. However, if I remove the itemize environment it does. I googled for this problem, and found suggestions that using the caption package would solve the problem, though I did not find any clear description of why the problem occurred in the first place. See for example


I'm using Debian squeeze with TeX Live 2009-11. The included version of caption has

\ProvidesPackage{caption}[2009/10/09 v3.1k Customizing captions (AR)]

I also tried downloading and using the caption package from


but this doesn't change anything. I put the sty files in my current directory. I assume that overrides the system files. This one corresponds to

\ProvidesPackage{caption}[2010/01/09 v3.1m Customizing captions (AR)]

Error message and example file follow.

ERROR: Argument of \@caption has an extra }.

--- TeX said ---
<inserted text> 
l.13     }

--- HELP ---
From the .log file...

I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.


      \item bar
share|improve this question
The reason for this behaviour is described in the caption package documentation, section 3.1 "Typesetting captions". Look out there for "fragile", "robust", and "into a horizontal box to determine the width of the caption". – Axel Sommerfeldt Feb 8 '11 at 7:49
I see that entry. The itemize environment causes problems with tex putting the caption text "into a horizontal box to determine the width of the caption", then? Or is the problem something else? – Faheem Mitha Feb 8 '11 at 8:11
Yes. If in doubt one can try it out by typesetting the stuff outside a \caption, but within a \hbox instead. – Axel Sommerfeldt Feb 8 '11 at 17:55
up vote 17 down vote accepted

From the caption manual:

If you want to typeset something special (like a tabular) as caption, you need to give an optional argument to \caption resp. \captionof for the List of Figures resp. List of Tables, too, even if you don’t use such list.



\caption[foo bar]{foo
    \item bar

share|improve this answer
Addendum #1: As an alternative for using the optional argument of \caption, one can specify the caption package option list=off if no lists of floating environments (like "List of Figures") are used. – Axel Sommerfeldt Feb 8 '11 at 7:44
Thanks Leo and Axel. I see this argument is used in the latex community example, but I didn't realize it was necessary. Can anyone explain why this problem occurs in the first place? Axel, not clear what a list of floating environments would look like. – Faheem Mitha Feb 8 '11 at 7:54
Damn, I see the first entry in the errors subsection has exactly this error, with the solution. – Faheem Mitha Feb 8 '11 at 8:01

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.