[Tex/LaTex] Adding “\usepackage{subfig}” (no other changes in file) throws error

incompatibilitysubfloats

I want to use the subfig package to have a neat row of figures with captions for each one of them. However, as soon as I add the line \usepackage{subfig}, pdfLaTeX fails with the following error:

! Undefined control sequence.
<argument> \sf@counterlist 

l.54 \begin{document}

I have commented this line (and the corresponding lines where I am actually using the subfig package) and everything works fine. The preamble is

\documentclass{sig-alternate-10pt}

\usepackage{times}
\usepackage{cite}
\usepackage{multirow}
\usepackage[tight,footnotesize]{subfigure}
\usepackage{url}
\usepackage[usenames,dvipsnames]{color}
\usepackage{xspace}
\usepackage{epsfig,url,hyperref}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{subfig}

\newcommand{\comment}[1]{}
\newcommand{\eat}[1]{}
\usepackage{booktabs}
\usepackage[export]{adjustbox}

\newcommand{\tightcaption}[1]{\vspace{-0.2cm}\caption{#1}\vspace{-0.2cm}}

\begin{document}

And here's the part where I am using the subfloats:

\begin{tabular}{cccc}
\subfloat[2006]{\includegraphics[width=.24\textwidth, height=.24\textwidth, frame]{figures/2006-cloud-crop.pdf}} &
\subfloat[2007]{\includegraphics[width=.24\textwidth, height=.24\textwidth, frame]{figures/2007-cloud-crop.pdf}} &
\subfloat[2008]{\includegraphics[width=.24\textwidth, height=.24\textwidth, frame]{figures/2008-cloud-crop.pdf}} &
\subfloat[2009]{\includegraphics[width=.24\textwidth, height=.24\textwidth, frame]{figures/2009-cloud-crop.pdf}} \\
\subfloat[2010]{\includegraphics[width=.24\textwidth, height=.24\textwidth, frame]{figures/2010-cloud-crop.pdf}} &
\subfloat[2011]{\includegraphics[width=.24\textwidth, height=.24\textwidth, frame]{figures/2011-cloud-crop.pdf}} &
\subfloat[2012]{\includegraphics[width=.24\textwidth, height=.24\textwidth, frame]{figures/2012-cloud-crop.pdf}} &
\subfloat[2013]{\includegraphics[width=.24\textwidth, height=.24\textwidth, frame]{figures/2013-cloud-crop.pdf}} \\
\end{tabular}

Is this error thrown due to some package incompatibility? I am a little taken aback by the error being thrown right after the preamble.

Best Answer

subfigure is considered obsolete by the package author:

The pack­age is now con­sid­ered ob­so­lete: it was su­per­seded by sub­fig, but users may find the more re­cent sub­cap­tion pack­age more sat­is­fac­tory.

Remove it from your preamble and use subfig only.

Related Question