[Tex/LaTex] change numbering in subfigure

numberingsubfloats

I use subfigure package, the numbering in the side-by-side figures is automatically (a), (b), (c)… I would like to change the numbering in one of the figures to (i), (ii), (iii)…This might be rather easy for the tex experts. If so, please drop me an advice, thanks! Yanting.

Best Answer

\documentclass{article}
\usepackage{subfigure}
\usepackage{graphicx}
\renewcommand\thesubfigure{(\roman{subfigure})}
\begin{document}
\begin{figure}
  \centering
  \subfigure[A subfigure\label{a}]{\includegraphics[width=.45\textwidth]{example-image-a}} \quad
  \subfigure[Another subfigure\label{b}]{\includegraphics[width=.45\textwidth]{example-image-b}}
  \caption{Some figures}\label{mainfigure}
\end{figure}
See Figures \ref{a} and \ref{b}.
\end{document}

enter image description here

However, subfigure is obsolete. Use subcaption instead:

\documentclass{article}
\usepackage[labelformat=simple]{subcaption}
\usepackage{graphicx}
\renewcommand\thesubfigure{(\roman{subfigure})}
\begin{document}
\begin{figure}
  \centering
  \begin{subfigure}{.45\textwidth}
    \includegraphics[width=\linewidth]{example-image-a}
    \caption{A subfigure}
    \label{a}
  \end{subfigure}\quad%
  \begin{subfigure}{.45\textwidth}
    \includegraphics[width=\linewidth]{example-image-b}
    \caption{Another subfigure}
    \label{b}
  \end{subfigure}
  \caption{Some figures}\label{mainfigure}
\end{figure}
See Figures \ref{a} and \ref{b}.
\end{document}

enter image description here