
나는 하위 그림과 함께 IEEEtran을 사용합니다 \figref
.
\begin{figure}
\centering
\subfloat[Foo.\label{fig:test-foo}]{\includegraphics[width=0.4\textwidth]{foo}} \\
\subfloat[Bar.\label{fig:test-bar}]{\includegraphics[width=0.4\textwidth]{bar}}
\caption{Foo and Bar.}
\label{fig:test}
\end{figure}
내가 사용하면 which is shown in \figref{fig:test-foo}.
다음을 얻습니다.
이는 그림 16a에 나와 있습니다.
그런데 보고싶다
이는 그림 16(a)에 나와 있습니다.
나는 다양한 변형을 포함하여 내가 찾을 수 있는 모든 것을 시도했습니다.
\usepackage[subrefformat=parens,labelformat=parens]{subfig}
그리고
\renewcommand{\thesubfigure}{(\alph{subfigure})}
첫 번째 옵션은 figref
. 를 사용하면 \renewcommand
작동 figref
하지만 그림 자체의 캡션에 이중 괄호가 붙습니다. 예:((a)) 푸.
답변1
다음을 시도해 보세요:
\documentclass{IEEEtran}
\usepackage{graphicx}
\usepackage[labelformat=simple]{subfig} % <---
\renewcommand{\thesubfigure}{(\alph{subfigure})} % <---
\newcommand\figref[1]{Fig.~\ref{#1}} % <---
\begin{document}
\begin{figure}
\centering
\subfloat[Foo.\label{fig:test-foo}]{\includegraphics[width=\columnwidth]{example-image-a}} \\
\subfloat[Bar.\label{fig:test-bar}]{\includegraphics[width=\columnwidth]{example-image-b}}
\caption{Foo and Bar.}
\label{fig:test}
\end{figure}
\ldots which is shown in \figref{fig:test}, particularly in \figref{fig:test-foo}
\end{document}