我想使用subfig将多张图片放在一个标题下。但是,出现了标题中提到的错误。
\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
添加到您的序言中。您的后面\usepackage{graphicx}
还有一个游离。修复这两个问题,您就可以上路了!}
\end{figure}