I used to have code like this: \caption{In \subref{fig:foo:a} you can see...}. Now I switched to using memoirs subtop/subbottom command instead of \subfigure. How can I refer to that subfigure?

As a temporary step I changed \subref to \autoref but that results in output like "In 1.1a you can see... ", I want "In (a) you can see...".

  • tex.stackexchange.com/questions/30572/… might be relevant
    – jonalv
    Commented Oct 17, 2011 at 13:59
  • I saw that but I specifically only want the non-number part. I.e. the letter (a, b)
    – Unapiedra
    Commented Oct 17, 2011 at 14:03
  • 2
    It is always best to compose a MWE that illustrates the problem including the \documentclass so that those trying to help don't have to recreate it. Commented Oct 17, 2011 at 15:32

4 Answers 4


memoir defines a "parent" macro for each of the subfloat counters. More specifically, when you issue the command

\newsubfloat{figure}% Allow for subfigures

it creates the subfigure counter as well as a p@subfigure macro to extract/prints the parent figure number. Modifying this macro to be empty removes this functionality. If you only want to disable this "parent" counter removal temporarily, you should use grouping to limit the scope of the macro redefinition:

enter image description here

\usepackage[margin=10mm]{geometry}% http://ctan.org/pkg/geometry
\usepackage[demo]{graphicx}% http://ctan.org/pkg/graphicx
% Allow subfloats for the following floats via \subbottom and/or \subtop
\newsubfloat{figure} % Subfigures
\newsubfloat{table} % Subtables
\renewcommand{\p@subfigure}{}% Void parent macro for figures
  \subbottom[This is a subfigure\label{fig:label:a}]{\includegraphics{figure1}} \qquad
  \subbottom[This is a subfigure\label{fig:label:b}]{\includegraphics{figure2}}
  \caption{These are some awesome figures}
See Figure~\ref{fig:label1}. It has subfigures~\ref{fig:label:a} and~\ref{fig:label:b}.

  \subbottom[This is a subfigure\label{fig:label:c}]{\includegraphics{figure3}} \qquad
  \subbottom[This is a subfigure\label{fig:label:d}]{\includegraphics{figure4}}
  \caption{These are some awesome figures}
See Figure~\ref{fig:label2}. It has subfigures~\ref{fig:label:c} and~\ref{fig:label:d}.

  \subbottom[This is a subtable\label{tbl:label:a}]{\includegraphics{table1}} \qquad
  \subbottom[This is a subtable\label{tbl:label:b}]{\includegraphics{table2}}
  \caption{These are some awesome tables}
See Table~\ref{tbl:label}. It has subtables~\ref{tbl:label:a} and~\ref{tbl:label:b}.

geometry was loaded just to make the minimal example fit on a single page.

  • Thanks! Also learned about the \begingroup command.
    – Unapiedra
    Commented Oct 18, 2011 at 16:36

I don't know if this is a new addition but as documented in the manual, on page 206, you can achieve this with \subcaptionref. Here is an example adapted from the manual:


\newsubfloat{figure} % Subfigures


Figure \ref{fig:twosubfig} has two subfigures, namely \ref{sf:1} and \subcaptionref{sf:2}.

  \subbottom[Subfigure 1]{\fbox{SUBFIGURE ONE}\label{sf:1}}
  \subbottom[Subfigure 2]{\fbox{SUBFIGURE TWO}\label{sf:2}}
  \caption{Figure with two subfigures} \label{fig:twosubfig}



Correct subfigure referencing

  • 1
    Great suggestion! That solves my problem in a more elegant way than the other solutions proposed here. Thanks a lot!
    – rmbianchi
    Commented Sep 29, 2015 at 16:59

One solution is to type that in by hand. This isn't an idiomatic solution and quite evident that it isn't great. It is easy to make a mistake (i.e. if subfigures are moved around).

However, it is not completely bad because the scope of usage will always be local. I will use this in the caption of the figure itself and from there reference the subfigures. It would be different if I were to do this in the body.

See this answer as the challenge to provide a better answer.


Change subfigure.sty...




change for:




  • 4
    Welcome to TeX.SX. Usually it is better to not edit directly originals .sty files. There are always other options for doing the same job. Commented Dec 27, 2013 at 18:16

You must log in to answer this question.

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