[Tex/LaTex] Subfigures with combined caption

floatsgraphicssubfloats

Is it possible to group figures into a single float and reference them separately, without creating separate caption for each of the figures?

enter image description here

I am aware of subfloat and subfigure environments, but they create separate captions for each figure. The feature I am specifically looking for is to have subfigure numbering (such as (a), (b), …) but also have the captions grouped together into a single block of text, separated by references ((a), (b), …) to the images.

Best Answer

Here is a solution with subcaption. I think similar result can be obtained by using subfloat also.

Just give \caption{} without any arguments so that it will print only the label ((a),(b)...) not the caption text. And then caption can be given for main figure, where subfigures can be 'sub'-reffered. Sample output:

enter image description here

Corresponding MWE made by modifying code from another question.

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\captionsetup{subrefformat=parens}

\begin{document}
\begin{figure}
    \centering
    \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{example-image-a}
        \caption{}
        \label{fig:a}
    \end{subfigure}
    \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{example-image-b}
        \caption{}
        \label{fig:b}
    \end{subfigure}
    \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{example-image-c}
        \caption{}
        \label{fig:c}
    \end{subfigure}
    \caption{
        \subref{fig:a} first figure.
        \subref{fig:b} second figure.
        \subref{fig:c} third figure.
    }
    \label{fig:main}
\end{figure}
Figure~\ref{fig:main} has three Subfigures--- \ref{fig:a}, \ref{fig:b} and  \ref{fig:c}.
\end{document}

EDIT

The caption can be placed on the left side by manually putting it there and using \phantomsubcaption to suppress the automatic caption. Sample output:

enter image description here

The corresponding code:

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\captionsetup{subrefformat=parens}

\begin{document}
\begin{figure}
    \centering
        {(a)~\includegraphics[width=0.25\linewidth]{example-image-a}
        \phantomsubcaption\label{fig:a}}
        {(b)~\includegraphics[width=0.25\linewidth]{example-image-b}
        \phantomsubcaption\label{fig:b}}
        {(c)~\includegraphics[width=0.25\linewidth]{example-image-c}
        \phantomsubcaption\label{fig:c}}
    \caption{
        \subref{fig:a} first figure.
        \subref{fig:b} second figure.
        \subref{fig:c} third figure.
    }
    \label{fig:main}
\end{figure}
Figure~\ref{fig:main} has three Subfigures--- \ref{fig:a}, \ref{fig:b} and  \ref{fig:c}.
\end{document}