需要添加下面的包:
\ifCLASSOPTIONcompsoc
\usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
\else
\usepackage[caption=false,font=footnotesize]{subfig}
\fi
还需要添加一个包
\usepackage{graphicx}
如果想让图很大(或者一个图包含多个子图),需要占据两列,那么需要*符号:
\begin{figure*}[!t]
\centering
\subfloat[Case I]{\includegraphics[width=2.5in]{forklift.png}\label{fig_first_case}}
\hfil
\subfloat[Case II]{\includegraphics[width=2.5in]{forklift.png}\label{fig_second_case}}
\caption{Simulation results for the network.}
\label{fig_sim}
\end{figure*}
上面这个例子,如果去掉*,那么就变成多个子图,但占一列。
如果是单个图,只需要占一列:
\begin{figure}[!t]
\centering
\includegraphics[width=2.5in]{a.png}
\caption{Forklift structure.}
\label{forklift}
\end{figure}