我无法使用autoref
我想更改格式形式 1a → 图 1(a)
我应该怎么办?
这是我的代码:
\documentclass[journal]{IEEEtran}
\hyphenation{op-tical net-works semi-conduc-tor} \label{setting}
\usepackage{graphicx}
\usepackage{hyperref}
\renewcommand{\figureautorefname}{Fig.}
\usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
\begin{document}
\begin{figure}[!t]
\centering
\subfloat[]{\includegraphics[width=2.5in]{A}\label{A}}
\\
\subfloat[]{\includegraphics[width=2.5in]{B}\label{B}}
\caption{LETTER }
\label{LETTER}
\end{figure}
The letter A is shown in \autoref{A}
\end{document}
多谢 !
答案1
由于A
是子图的标签(而不是图的标签),因此请尝试\subfigureautorefname
代替\figureautorefname
:
\documentclass[journal]{IEEEtran}
\hyphenation{op-tical net-works semi-conduc-tor}% \label{setting}
\usepackage[demo]{graphicx}
\usepackage{hyperref}
\newcommand{\subfigureautorefname}{Fig.}
\usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
\begin{document}
\begin{figure}[!t]
\centering
\subfloat[]{\includegraphics[width=2.5in]{A}\label{A}}
\\
\subfloat[]{\includegraphics[width=2.5in]{B}\label{B}}
\caption{LETTER}
\label{LETTER}
\end{figure}
The letter A is shown in \autoref{A}
\end{document}