考虑这个例子:
\begin{figure}[H]
\begin{center}
\subfigure[]{%
\includegraphics[height=4cm,width=4.5cm]{Fig_10(a)_Current_NLL_Sag}}
\label{subfig:real time single phase current NLL sag}
\subfigure[]{%
\includegraphics[height=4cm,width=4.5cm]{Fig_10(b)_Current_NLL_LL_Sag}}
\label{subfig:real time single phase current NLL LL sag}
\subfigure[]{%
\includegraphics[height=4cm,width=4.5cm]{Fig_10(c)_Voltage_NLL_LL_Sag}}
\label{subfig:real time single phase voltage NLL LL sag}
\caption{%
\small \sl
Opal-RT results under voltage sag condition: $(a)$ load,
source and compensating current with NLL only $(b)$ load,
source and compensating current with NLL and LL $(c)$ source,
load and series injected voltage with NLL and LL
}
\end{center}
\label{Fig:real time single phase sag}
\end{figure}
与我预期相反,PDF 仅显示“??”
答案1
你需要
\subfigure[<caption>]{<image>\label{..}}
不是
\subfigure[<caption>]{<image>}\label{..}
请注意,\label
放在最后一个右括号之前。完整示例如下。我还center
用以下代码替换了环境:\centering
,参见。RevTeX 文章中的奇怪图形编号
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{subfigure}
\begin{document}
\begin{figure}
\centering
\subfigure[]{\includegraphics[height=4cm,width=4.5cm]{Fig_10(a)_Current_NLL_Sag}\label{subfig:real time single phase current NLL sag}}
\subfigure[]{\includegraphics[height=4cm,width=4.5cm]{Fig_10(b)_Current_NLL_LL_Sag}\label{subfig:real time single phase current NLL LL sag}}
\subfigure[]{\includegraphics[height=4cm,width=4.5cm]{Fig_10(c)_Voltage_NLL_LL_Sag}\label{subfig:real time single phase voltage NLL LL sag}}
\caption{\small \slshape Opal-RT results under voltage sag condition: $(a)$ load, source and compensating current with NLL only $(b)$ load, source and compensating current with NLL and LL $(c)$ source, load and series injected voltage with NLL and LL}
\label{Fig:real time single phase sag}
\end{figure}
Fig.~\ref{Fig:real time single phase sag} has
\ref{subfig:real time single phase current NLL sag},
\ref{subfig:real time single phase current NLL LL sag}, and
\ref{subfig:real time single phase voltage NLL LL sag}
\end{document}
但请注意,该subfigure
包被视为已弃用,因此通常建议迁移到较新的subcaption
包(或可能subfig
)。不过,该包的语法不同。以下是使用 的一个示例subcaption
:
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{subcaption}
\captionsetup[figure]{textfont={small,sl}}
\begin{document}
\begin{figure}
\centering
\subcaptionbox{\label{subfig:real time single phase current NLL sag}}{\includegraphics[height=4cm,width=4.5cm]{Fig_10(a)_Current_NLL_Sag}}
\subcaptionbox{\label{subfig:real time single phase current NLL LL sag}}{\includegraphics[height=4cm,width=4.5cm]{Fig_10(b)_Current_NLL_LL_Sag}}
\subcaptionbox{\label{subfig:real time single phase voltage NLL LL sag}}{\includegraphics[height=4cm,width=4.5cm]{Fig_10(c)_Voltage_NLL_LL_Sag}}
\caption{Opal-RT results under voltage sag condition: $(a)$ load, source and compensating current with NLL only $(b)$ load, source and compensating current with NLL and LL $(c)$ source, load and series injected voltage with NLL and LL}
\label{Fig:real time single phase sag}
\end{figure}
Fig.~\ref{Fig:real time single phase sag} has
\ref{subfig:real time single phase current NLL sag},
\ref{subfig:real time single phase current NLL LL sag}, and
\ref{subfig:real time single phase voltage NLL LL sag}
\end{document}