I want to label subfigures, across many figures, with sequential positive integers.
For example, the first figure may have two subfigures with label tags {fig1:subfig1} and {fig1:subfig2} and the second figure may have three subfigures with label tags {fig2:subfig1}, {fig2:subfig2}, and {fig2:subfig3}.
Then, when referencing these labels,
{fig1:subfig1}
{fig1:subfig2}
{fig2:subfig1}
{fig2:subfig2}
{fig2:subfig3}
would display as
1
2
3
4
5.
How can I do this using the subfigure package?
I didn't know how to use the subfig package yet. In the meantime, there is a MWE using the subfigure package.
\documentclass[12pt]{article}
\usepackage{subfigure}
\begin{document}
\begin{figure}[ht]
\subfigure[subfigure A]{This is a figure. \label{label1}}
\subfigure[subfigure B]{This is a figure. \label{label2}}
\end{figure}
\begin{figure}[ht]
\subfigure[subfigure A]{This is a figure. \label{label3}}
\subfigure[subfigure B]{This is a figure. \label{label4}}
\subfigure[subfigure C]{This is a figure. \label{label5}}
\end{figure}
Tesing referencing labels: \ref{label1} \ref{label2} \ref{label3} \ref{label4}
Desired result: 1 2 3 4 5
\end{document}





subfigpackage. Every example I found is not a "minimal working example". Can you point me to one? – Tyson Williams Jun 27 '11 at 16:37minipages which hold the figure content and a\caption. There can be multiple figures with captions in onefigureenvironment. – Martin Scharrer♦ Jun 27 '11 at 19:39