I'm looking for a possibility to put the label (a),(b),(c)… of a subfigure beside the subfigure and the caption below. So I'm tried sidesubfigure (Subfig label positioning), which puts the label exactly as I want to, but I didn't find a solution to put the caption below the image.
\documentclass{article}
\usepackage{floatrow}
\usepackage{subfig}
\usepackage{caption}
\usepackage{rule}
\begin{document}
\begin{figure}
\sidesubfloat[description]{\rule{2cm}{2cm}}
\hfill
\sidesubfloat[description]{\rule{2cm}{2cm}}
\end{figure}
\end{document}
Is there a possiblity to do that?
Edit: Just got another problem, when I'm adding 4 same size picture in 2 rows like this, the pictures are shifted:
\begin{figure}[H]
\begin{mysubfigure}{desc}{imageA}
\includegraphics[width=4cm, height=4cm]{imageA}
\end{mysubfigure}
\hfill
\begin{mysubfigure}{shorter desc}{imageB}
\includegraphics[width=4cm, height=4cm]{imageB}
\end{mysubfigure}
\newline
\begin{mysubfigure}{desc}{imageC}
\includegraphics[width=4cm, height=4cm]{imageC}
\end{mysubfigure}
\hfill
\begin{mysubfigure}{shorter desc}{imageD}
\includegraphics[width=4cm, height=4cm]{imageD}
\end{mysubfigure}
\caption{Two images: \subref{imageA} is imageA, \subref{imageB} is imageB}
\end{figure}
Best Answer
Here is a solution using the
stackengine
(and thevarwidth
) package.