\subfig
我刚刚按照 TeX.SX 上的建议改用。现在,代码如下:
\begin{figure}[th]
\centering
\begin{subfloat}{0.5\textwidth}
\includegraphics{graphics/q4-execution-plan/transformation-1-before}
\label{subfig:q4-t1-before}
\caption{before}
\end{subfloat}
\end{figure}
并得到:
Package caption Warning: The caption type was already set to `subfloat'
(caption) on input line 135.
See the caption package documentation for explanation.
! You can't use `\relax' after \advance.
<recently read> \c@subsubfloat
l.135 \begin{subfloat}
{0.5\textwidth}
我不太明白发生了什么……我需要使用更多软件包/其他软件包组合吗?设置软件包选项?还是我使用\subfloat
错了?
答案1
您的语法代码片段让我对subcaption
语法感到困惑。对于subfig
软件包,请尝试以下操作:
\begin{figure}[htb]
\centering
\subfloat[before \label{subfig:q4-t1-before}]
{\includegraphics{graphics/q4-execution-plan/transformation-1-before}}
\caption{Main caption}
\end{figure}