I would like to reference a subfigure as "Fig. 3 (a)" using \ref{fig:figure3a} but instead I am getting "Fig. 3a". How would I add the braces to a subfigure reference?

Where the original image beng referenced is two subfigures as shown below.


%% Language and font encodings
\usepackage[afrikaans, english]{babel}

%%%%%%%%%%%%%%%%%%%%%%% Packages %%%%%%%%%%%%%%%%%%%%%%%
\usepackage{svg} % To be able to add SVG images

%%%%%%%%%%%%%%%%%%%%%%% Sets page size and margins %%%%%%%%%%%%%%%%%%%%%%%
\geometry{a4paper,  total={210.2mm,297.3mm}, left=25mm, right = 25mm, top=26.3mm, bottom=43.8mm }


In text reference to fix: Fig.~\ref{fig:figure3a}.


    \caption{image a}
  \end{subfigure} \hfill

    \caption{image b}
  \end{subfigure}  \hfill

\caption{outer caption.}

\bibliography{sample} % no need for bibliography


I tried using:

%%% Fig. 1(a) instead of Fig. 1a
\usepackage[caption=false,labelformat=simple]{subfig} % "labelformat=simple" removes the parenthesis from the caption label
\renewcommand\thesubfigure{(\alph{subfigure})}  % This one adds parenthesis to the display format

from here (a stack overflow post on the problem using subfig package) but I got an error message, even when I tried to remove the subcaption package.

I want to keep the packages above and get the reference to work.

1 Answer 1






The second line adds parentheses whenever referencing the value of the counter. This will lead to double parentheses in the sub-captions, as there the parentheses are the default. Hence the option labelformat=simple to remove them.

  • Thank you @gernot , this worked well.
    – user4933
    Commented Jan 1, 2022 at 12:14

You must log in to answer this question.

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