I have a figure with multiple parts (a, b, c, etc.) and in the text I would like to have a reference to the figure with the letter of the part (i.e. fig 1(b) ). Is there a way to pass this to \cref{}
or \ref{}
in order to have it do this?
EDIT: So this turned out to be a dumb question. I forgot \ref{}
returns just the number, so this is easily done using
Figure \ref{fig:1}a says...
Best Answer
If you are using the
subfig
or thesubcaption
package to build your subfloats, in addition to the standard\ref
command, you can also use\subref
to reference a particular subfloat. The standard\ref
command returns a label built by concatenating the float number and\thesubfloat
; the\subref
command only returns the label for the subfloat:Using
cleveref
you can use\crefname
,\Crefname
to change the default names used for subfigures: