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.
Asked
Active
Viewed 1.2k times
2 Answers
1
\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}
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}
-
1(i) read my comment: don't encourage OP to use obsolete pacages (ii) using this package you already found answer for op question, so yours is duplicate. – Zarko Apr 06 '19 at 03:57
1
the
subfigure package is obsolete. it is replaced withsubfigwhich definesubfloat` environment:\subfloat[...]{\includegraphics{<imge file name>}}).you can change numbering of sub figures with
\renewcommand\thesubfigure{\roman{subfigure}}
it would be even better to follow the subcaption package:
\documentclass{article}
\usepackage{subcaption}
\usepackage{graphicx}
\renewcommand\thesubfigure{\roman{subfigure}}
\captionsetup{subrefformat=parens}
\begin{document}
\begin{figure}
\centering
\begin{subfigure}{.3\linewidth}
\includegraphics[width=\linewidth]{example-image-duck}
\caption{sub caption a}
\label{fig:figure-1.a}
\end{subfigure}
\hfil
\begin{subfigure}{.3\linewidth}
\includegraphics[width=\linewidth]{example-image-duck}
\caption{sub caption b}
\label{fig:figure-1.b}
\end{subfigure}
\hfil
\begin{subfigure}{.3\linewidth}
\includegraphics[width=\linewidth]{example-image-duck}
\caption{sub caption c}
\label{fig:figure-1.c}
\end{subfigure}
\caption{My figures}
\label{fig:figure1}
\end{figure}
See Figures \ref{fig:figure-1.a}, \ref{fig:figure-1.b} and \ref{fig:figure-1.c} \dots
Zarko
- 296,517



subfigurepackage is obsolete. it is replaced withsubfig(\subfloat[...]{\includegraphics{<name>}}). it would be even better to follow thesubcaptionpackage. – Zarko Apr 06 '19 at 03:53