图 1a 变成图 1a (但“a”在 \textit 中)

图 1a 变成图 1a (但“a”在 \textit 中)
   \documentclass[conference]{IEEEtran}
   \usepackage{graphicx}
   \usepackage{subcaption}
    

   \begin{document}

   \begin{figure}[h!]
   \centering
   \begin{subfigure}{.25\textwidth}
     \centering
     \includegraphics[width=.6\linewidth]{example-image-a}
     \caption{ \textit{a} }
     \label{1a}
   \end{subfigure}%
   \begin{subfigure}{.25\textwidth}
     \centering
     \includegraphics[width=.715\linewidth]{example-image-b}
     \caption{ \textit{b} }
     \label{1b}
   \end{subfigure}
   \caption{ }
   \label{fig1}
   \end{figure}

   I have Fig. \ref{1a}

   \end{document}

我需要

在此处输入图片描述

完整来源: https://ru.overleaf.com/5964955496qykytjbjtbgx

答案1

(评论已改为答案。)

\documentclass[conference]{IEEEtran}

\usepackage{graphicx}
\usepackage{subcaption}

\renewcommand\thesubfigure{{\itshape\alph{subfigure}}} %<--- added

\begin{document}

\begin{figure}
    \centering
    \begin{subfigure}{.25\textwidth}
         \centering
         \includegraphics[width=.6\linewidth]{example-image-a}
         \caption{ \textit{a} }
         \label{1a}
    \end{subfigure}%
    \begin{subfigure}{.25\textwidth}
         \centering
         \includegraphics[width=.715\linewidth]{example-image-b}
         \caption{ \textit{b} }
         \label{1b}
    \end{subfigure}
    \caption{ }
    \label{fig1}
\end{figure}

I have Fig. \ref{1a} text text

\end{document}

在此处输入图片描述

相关内容