2

I want to use subfig to put multiple pictures under one caption. However, the error mentioned in the title occurs.

\documentclass[conference]{IEEEtran}
\usepackage{cite}
%\usepackage[caption=false]{caption}
%\usepackage[font=footnotesize]{subfig}
\usepackage[caption=false,font=footnotesize]{subfig}
\usepackage{url}
\usepackage{amssymb}
\usepackage{amsmath}

\newcommand{\sH}{{\sf H}}
\newcommand{\veceps}{{\boldsymbol{\varepsilon}}}
\newcommand{\isdef}{\stackrel{\rm def}{=}}

\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}

\begin{document}

\title{title}

\author{\IEEEauthorblockN{Peter Pan}
\IEEEauthorblockA{Peter Pan Holding\\
who knows\\
Email: [email protected]}
\and
}

\maketitle

\begin{abstract}
%\boldmath
bla.
\end{abstract}

\IEEEpeerreviewmaketitle

\begin{figure}[!ht]
    \subfloat[First sub-figure\label{subfig-1:dummy}]{%
      \includegraphics[width=0.45\textwidth]{gfx/tau_enrollment-aging1-SRAM}
    }
    \hfill
    \subfloat[First sub-figure\label{subfig-2:dummy}]{%
      \includegraphics[width=0.45\textwidth]{gfx/tau_enrollment-aging1-SRAM}
    }
    \caption{Dummy figure}
    \label{fig:dummy}
\end{figure}}


\bibliographystyle{IEEEtran}

\bibliography{references}

\end{document}

1 Answer 1

5

Add \usepackage{graphicx} to your preamble. You also have a stray } after your \end{figure}. Fix those two things and you'll be on your way!

You must log in to answer this question.

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