I'm trying to find a way to reference the counter of the main figure, when a figure contains several subfigures. Using \ref I get e.g. '1a', using \subref I get only the 'a'. Is there a way to get only the main counter, i.e. '1'
Of course I could add another \label to the main caption, but I was wondering if there is another way without adding more and more labels to my document.
Thanks for any help!
MWE:
\documentclass{scrartcl}
\usepackage{graphicx, caption, subcaption}
\begin{document}
\begin{figure}
\centering
\begin{subfigure}{0.48\linewidth}
\includegraphics[width=\linewidth]{example-image-a}
\caption{}\label{fig:image_a}
\end{subfigure}
\hfill
\begin{subfigure}{0.48\linewidth}
\includegraphics[width=\linewidth]{example-image-b}
\caption{}\label{fig:image_b}
\end{subfigure}
\caption{Figure \subref{fig:image_a}) and Figure \subref{fig:image_b}).}
\end{figure}
This is a reference to the subfigure: Figure \ref{fig:image_a}.
This is a reference to the letter of the subfigure: Figure \subref{fig:image_a}
This is a reference to the number of the figure only: ??? (wanted result: Figure 1)
\end{document}

\labelafter the main caption. Then you can\refit. – Michael Chatiskatzi Dec 17 '19 at 13:52