我如何引用具有这种样式的子图(如图 1(a) 所示)?
如果我使用Fig.~\ref{fig_first_case}
,则不会得到括号。
\documentclass[lettersize,journal]{IEEEtran}
\usepackage{amsmath,amsfonts}
\usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
\usepackage{stfloats}
\usepackage{graphicx}
\begin{document}
How can I reference the subfigure with this style like Fig.1(a)?
If I use Fig.~\ref{fig_first_case} then I don't get the parentheses.
\begin{figure*}[!t]
\centering
\subfloat[]{\includegraphics[width=2.5in]{example-image-a}%
\label{fig_first_case}}
\hfil
\subfloat[]{\includegraphics[width=2.5in]{example-image-a}%
\label{fig_second_case}}
\caption{Dae. Ad quatur autat ut porepel itemoles dolor autem fuga. Bus quia con nessunti as remo di quatus non perum que nimus. (a) Case I. (b) Case II.}
\label{fig_sim}
\end{figure*}
\end{document}
答案1
subfig
用選項加载labelformat=simple
。\renewcommand\thesubfigure{(\alph{subfigure})}
在序言中使用。
\documentclass[lettersize,journal]{IEEEtran}
\usepackage{amsmath,amsfonts}
\usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf,labelformat=simple]{subfig}
\usepackage{stfloats}
\usepackage[demo]{graphicx}
\renewcommand\thesubfigure{(\alph{subfigure})}
\begin{document}
How can I reference the subfigure with this style like Fig.1(a)?
If I use Fig.~\ref{fig_first_case} then I don't get the parentheses.
\begin{figure*}[!t]
\centering
\subfloat[]{\includegraphics[width=2.5in]{example-image-a}%
\label{fig_first_case}}
\hfil
\subfloat[]{\includegraphics[width=2.5in]{example-image-a}%
\label{fig_second_case}}
\caption{Dae. Ad quatur autat ut porepel itemoles dolor autem fuga. Bus quia con nessunti as remo di quatus non perum que nimus. (a) Case I. (b) Case II.}
\label{fig_sim}
\end{figure*}
\end{document}
只执行步骤 2 而不执行步骤 1 将会在子图标签周围打印双括号: