1

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.

3
  • Related: tex.stackexchange.com/q/61612/156344
    – user156344
    Apr 6, 2019 at 3:44
  • 2
    thesubfigure package is obsolete. it is replaced with subfig (\subfloat[...]{\includegraphics{<name>}}). it would be even better to follow the subcaption package.
    – Zarko
    Apr 6, 2019 at 3:53
  • Thanks a lot! That works. However, this command has changed all the numberings to roman throughout the manuscript, what I need is to only change the numbering in one figure to roman, and the numberings in other figures remain alphabetical. Is that possible without switching the package? (still use subfigure package) Thanks!
    – Yanting
    Apr 6, 2019 at 4:04

2 Answers 2

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}

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

1
  • 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 6, 2019 at 3: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

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .