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

when I try \usepackage{subcaption} immediately at the beginning of my document I get an error:

Command \c@subfigure already defined

What can I do?

share|improve this question
Please add a minimal working example (MWE) that illustrates your problem. – egreg Oct 14 '12 at 15:37
I guess we need more information. Which class are you using? Which packages do you load? – Qrrbrbirlbel Oct 14 '12 at 15:38
up vote 6 down vote accepted

It seems that two packages define this counter. Ensure that you only load the required packages. Here, with subcaption load caption before, but not subfigure or subfig, which do a similar job but are not required if you already use subcaption, as mentioned.

Already loading subfig and then subfigure produces this error. MWE:


To sum up: just load the needed package(s), and remove unnecessary packages.

share|improve this answer
Thanks it worked, but first I had to do a Clean All before I called Latex – mljrg Oct 14 '12 at 22:32

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.