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?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communitywhen I try \usepackage{subcaption}
immediately at the beginning of my document I get an error:
Command \c@subfigure already defined
What can I do?
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:
\documentclass{article}
\usepackage{subfig}
\usepackage{subfigure}
\begin{document}
text
\end{document}
To sum up: just load the needed package(s), and remove unnecessary packages.
Clean All
before I called Latex