I am trying to use the subcaption
package (not subfig
) to generate the labels of the subfigures beside the figure.
I have found many similar questions, but all answers (like this one) use subfig
and floatrow
. I have tried using floatrow
with subcaption
(see MWI below), but I could not generate the same behaviour. What am I missing?
The subcaption
manual explicitly states that
[f]or a more advanced usage of the sub-caption feature of the
caption
package, please take a look at thefloatrow
package
but the floatrow
manual only gives an example of a caption beside the figure using subfig
(p.75).
So any help is greatly appreciated.
MWE:
\documentclass{scrartcl}
\usepackage{graphicx}
\usepackage[font=footnotesize,figurewithin=none]{caption}
\usepackage{subcaption}
\captionsetup{subrefformat=parens} % will result in references (typeset with \ref) like 1a but sub-references (typeset with\subref) like (a)
\usepackage{floatrow}
\floatsetup[subfigure]{style=plain,subcapbesideposition=top}
%\usepackage{subfig} % not compatible with subcaption
\begin{document}
\begin{figure}
\centering
\begin{subfigure}[t]{0.7\textwidth}
\centering
\includegraphics[width=0.7\textwidth]{example-image-a}
\caption{}
\label{subfig:a}
\end{subfigure}
\\
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-b}
\caption{}
\label{subfig:b}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-c}
\caption{}
\label{subfig:c}
\end{subfigure}
\caption{Caption for all subfigs: \subref{subfig:a},\subref{subfig:b}, \subref{subfig:c}}
\label{fig}
\end{figure}
\end{document}
Output of MWE: