I changed my figure numbering to section-style numbering for my thesis:
\numberwithin{figure}{section}
That's fine, but the only problem that remains in the following MWE:
\documentclass[english,12pt]{article}
\usepackage{float}
\usepackage{subfigure}
\begin{document}
\begin{figure}[H]
\centering
\subfigure[First temperature cycle. We measured additionally at +1$^{\circ}$C.]{
\includegraphics[width=0.98\textwidth]{./figures/mu_vs_v_1st.pdf}
\label{fig:mu_vs_v_1st}
}\\
\subfigure[Second temperature cycle. Note the difference to the first cycle of 1$^{\circ}$C in the highest temperature measured.]{
\includegraphics[width=0.98\textwidth]{./figures/mu_vs_v_2nd.pdf}
\label{fig:mu_vs_v_2nd}
}
\label{fig:mu_vs_v}
\end{figure}
\end{document}
Here I get the section style numbering for the figure as a whole (Fig. 5.3 – the figure being the third one in Section 5) but I get Fig. 7(a) and 7(b) for referral straight to the subfigures (the figure being the seventh in the whole thesis).
What should I change to get Fig. 5.3(a) and 5.3(b) for the subfigures as well? Thanks in advance!
Best Answer
You can redefine
\p@subfigure
which controls the prefix used for the cross-references to subfigures:The
demo
option forgraphicx
simply replaces actual figures with black rectangles; do not use that option in your actual document.By the way,
subfigure
is an obsolete package. You should consider usingsubfig
orsubcaption
instead.Using the
subfig
package has an additional advantage: you don't need to redefine\p@subfigure
since internally the package does this for you: