问题
在ieee transactions模板中使用了\usepackage{subcaption}来显示多子图产生报错:
LaTeX Error: Environment subfigure undefined.
解决方案
其实ieee transactions模板里自带了一个处理多子图的包 \usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
不需要做其它改动,也不需要使用使用subcaption包,就使用这个自带的包来显示多子图就好了。
一个正确的使用例子:
\begin{figure}[H]
\centering
\subfloat[Global data.]{%
\includegraphics[width=0.7\linewidth, height=4cm]{./wtb_location.png}%
\label{fig:global_data}%
}\hfill
\subfloat[Long-term data.]{%
\includegraphics[width=0.3\linewidth, height=4cm]{./wtb_lt_location.png}%
\label{fig:long_term_data}%
}
\caption{Study area (in terms of GBT dataset, ranging from $0^{\circ}N$ to $48^{\circ}N$ and $97^{\circ}E$ to $135^{\circ}E$).} % 添加共享的图题
\label{location} % 如果需要引用此图,可以使用这个标签
\end{figure}