# Figure numbering

I have a figure composed by 9 subfigures (3 rows and 3 columns). I divided this figure into 2 blocks using the following commands: \addtocounter{figure}{-1} and \addtocounter{subfigure}{1}. These 2 blocs have the same label and the same figure number (Figure 1). I would like that the numbers of the 2 figures (blocs) become "Figure 1.1" and "Figure 1.2". Any ideas? Thank you.

• Please post a minimal version of your document containing the code for the figures. – Gonzalo Medina Apr 16 '14 at 15:48
• \renewcommand{\thefigure}{\arabic{figure}.\arabic{subfigure}} or whatever counters you want to use. – John Kormylo Apr 16 '14 at 15:55
• <i>\begin{figure}[!h] \centering \subfigure[a]{ \includegraphics[width=0.31\linewidth]{fig1.pdf} } \subfigure[b]{ \includegraphics[width=0.31\linewidth]{fig2.pdf} } \subfigure[c]{ \includegraphics[width=0.31\linewidth]{fig3.pdf} }\\ \subfigure[d]{ .... } \caption{title} \label{fig:1} \end{figure} \addtocounter{figure}{-1} \begin{figure}[ht] \addtocounter{subfigure}{1} \centering \subfigure[...]{ \includegraphics[width=0.31\linewidth]{fig7.pdf} } ... \caption{title} \label{fig:1} \end{figure}</i> – user49608 Apr 16 '14 at 16:02
• Should those two blocks "stick" together? I mean, you don't want them to be separated but to form just one block, right? – Gonzalo Medina Apr 16 '14 at 16:10
• @JohnKormylo I want to change only the numbering for these 2 figures(Figure 1.1 and Figure 1.2). These 2 figures are composed by subfigures. The other figures retain their numbering (Figure 2, Figure 3). – user49608 Apr 16 '14 at 16:10

Here's one possibility using a temporal counter. For me it wasn't clear why you used

  \addtocounter{subfigure}{1}


but I respected this in my example codes below.

\documentclass{article}
\usepackage{subfigure}
\usepackage[demo]{graphicx}

\newcounter{tmp}

\begin{document}

\begin{figure}
\centering
\subfigure[a]{\includegraphics[width=0.31\linewidth]{fig1.pdf}}\hfill
\subfigure[b]{\includegraphics[width=0.31\linewidth]{fig2.pdf}}\hfill
\subfigure[c]{\includegraphics[width=0.31\linewidth]{fig3.pdf}}\\
\subfigure[d]{\includegraphics[width=0.31\linewidth]{fig4.pdf}}\hfill
\subfigure[e]{\includegraphics[width=0.31\linewidth]{fig5.pdf}}\hfill
\subfigure[f]{\includegraphics[width=0.31\linewidth]{fig6.pdf}}\\
\refstepcounter{tmp}
\renewcommand\thefigure{\arabic{figure}.\arabic{tmp}}
\caption{title}
\label{fig:11}
\end{figure}
\begin{figure}
\centering
\refstepcounter{tmp}
\renewcommand\thefigure{\arabic{figure}.\arabic{tmp}}
\subfigure[g]{\includegraphics[width=0.31\linewidth]{fig7.pdf}}\hfill
\subfigure[h]{\includegraphics[width=0.31\linewidth]{fig8.pdf}}\hfill
\subfigure[i]{\includegraphics[width=0.31\linewidth]{fig9.pdf}}
\caption{title}
\label{fig:12}
\end{figure}

\end{document}


subfigure is an obsolete package which shouldn't be used anymore; in its stead you should use subfig or subcaption. Here's the above approach, but using subfig:

\documentclass{article}
\usepackage{subfig}
\usepackage[demo]{graphicx}

\newcounter{tmp}

\begin{document}

\begin{figure}
\centering
\subfloat[a]{\includegraphics[width=0.31\linewidth]{fig1.pdf}}\hfill
\subfloat[b]{\includegraphics[width=0.31\linewidth]{fig2.pdf}}\hfill
\subfloat[c]{\includegraphics[width=0.31\linewidth]{fig3.pdf}}\\
\subfloat[d]{\includegraphics[width=0.31\linewidth]{fig4.pdf}}\hfill
\subfloat[e]{\includegraphics[width=0.31\linewidth]{fig5.pdf}}\hfill
\subfloat[f]{\includegraphics[width=0.31\linewidth]{fig6.pdf}}\\
\refstepcounter{tmp}
\renewcommand\thefigure{\arabic{figure}.\arabic{tmp}}
\caption{title}
\label{fig:11}
\end{figure}
\begin{figure}
\centering
\renewcommand\thefigure{\arabic{figure}.\arabic{tmp}}
\refstepcounter{tmp}
\subfloat[g]{\includegraphics[width=0.31\linewidth]{fig7.pdf}}\hfill
\subfloat[h]{\includegraphics[width=0.31\linewidth]{fig8.pdf}}\hfill
\subfloat[i]{\includegraphics[width=0.31\linewidth]{fig9.pdf}}
\caption{title}
\label{fig:12}
\end{figure}

\end{document}


The demo option for graphicx simply replaces actual figures with black rectangles; do not use that option in your actual document.

• I can't put the 9 subfigures on the same page, they are large. So, I want them (blocks) to be separated. – user49608 Apr 16 '14 at 16:55
• @user49608 please see my updated answer. – Gonzalo Medina Apr 16 '14 at 17:01
• @user49608 You're welcome! Don't forget that you can accept an answer you consider solved your problem by clicking the checkmark to its left. In case of doubt, please see How do you accept an answer?. – Gonzalo Medina Apr 16 '14 at 17:33