![](https://pics.latexstudio.net/data/images/201911/a6b98dc840b4123.jpg) 我想把1a改为Fig. 1(a),应该怎么做? MWE链接在下面 [https://paste.ubuntu.com/p/dT55JZfqFg/](https://paste.ubuntu.com/p/dT55JZfqFg/) 含图片的压缩包 ![](/static/images/ext/zip.gif)LATEX QUESTION.zip

2 回答2

30
另外,也可以使用`cleveref`宏包实现,如: ```tex \documentclass[journal]{IEEEtran} \hyphenation{op-tical net-works semi-conduc-tor} \label{setting} \usepackage{graphicx} % add figures\\ \usepackage{mwe} % \usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig} % anothor is to use the cleveref package. \usepackage[nameinlink]{cleveref} % set crefname \crefname{figure}{Fig.}{Fig.} \begin{document} \begin{figure}[!t] \centering \subfloat[]{\includegraphics[width=2.5in]{example-image-a}\label{subfig:a}} \\ \subfloat[]{\includegraphics[width=2.5in]{example-image-b}\label{subfig:b}} \caption{subfigexample} \label{fig:figexample} \end{figure} The letter A is shown in \cref{subfig:a} The letter B is shown in \cref{subfig:b} The letter is shown in \cref{fig:figexample} \end{document} ```
24
用 `subfig` 宏包的方案 ```tex \documentclass[journal]{IEEEtran} \usepackage{graphicx} \usepackage{subfig} \captionsetup[subfigure]{labelformat=simple} \renewcommand\thesubfigure{(\alph{subfigure})} \usepackage{hyperref} \newcommand{\subfigureautorefname}{Fig.} % the name is sub-figure-auto-ref-name \usepackage{mwe} % for use of sample images \begin{document} \begin{figure}[!t] \centering \subfloat[]{\includegraphics[width=2.5in]{example-image-a}\label{A}} \\ \subfloat[]{\includegraphics[width=2.5in]{example-image-b}\label{B}} \caption{LETTER } \label{LETTER} \end{figure} The letter A is shown in \autoref{A} \end{document} ``` ![](https://pics.latexstudio.net/data/images/201911/f83d03e970c60ef.png) ------ 另提供一个 `subcaption` 宏包的方案,这个宏包可用来替代 `subfig` 和 `subfigure`。输出无变化,不重复贴图。 ```tex \documentclass[journal]{IEEEtran} \usepackage{graphicx} % ref: https://tex.stackexchange.com/a/512010 \usepackage{subcaption} \renewcommand\thesubfigure{(\alph{subfigure})} \captionsetup[sub]{labelformat=simple} \usepackage{hyperref} \renewcommand{\figureautorefname}{Fig.} \usepackage{mwe} % for use of sample images \begin{document} \begin{figure}[!t] \centering \subfloat[]{\includegraphics[width=2.5in]{example-image-a}\label{A}} \\ \subfloat[]{\includegraphics[width=2.5in]{example-image-b}\label{B}} \caption{LETTER } \label{LETTER} \end{figure} The letter A is shown in \autoref{A} \end{document} ```

你的回答

请登录后回答

你的回答将会帮助更多人,请务必认真回答问题。