I have the following working example
\documentclass{article}
\usepackage[subrefformat=parens,labelformat=parens]{subfig}
\begin{document}
\textbf{Error} This should say Fig. 1\textbf{a}, not \ref{sf1}
\begin{figure}
\centering
\subfloat[Subfig 1]{\label{sf1} Contents of the sub-figure}
\qquad
\subfloat[Subfig 2]{\label{sf2} Contents of the sub-figure}
\caption{\textbf{Error} This should only say \textbf{b}, not \ref{sf2}}
\label{fig}
\end{figure}
\end{document}
Basically my problem it stated in the MWE above.
- When I reference a subfigure inside the figure caption, I want it only to refer to the bolded letter
- When I reference a subfigure outside the figure caption, I want it to refer to the figure number + the bolded letter