3

I would like to align one big image next to three different small ones with the help of the subcaption (wich is used in all the rest of my document). But I still don't get the posistions "right". The one-nextTo-two version looks okay (despite an unnecessary horizontal space in the beginning), but adding the third figure yield in the opening of a third column...

Can anybody help me to get this mess in the right form?

Thanks a lot in advance, Guntram

\documentclass[]{article}
\usepackage[utf8]{inputenc} 
\usepackage[demo]{graphicx}
\usepackage{floatrow}
\usepackage{subcaption}

\begin{document}
\begin{figure}
\ffigbox[\FBwidth]{ 
\begin{subfloatrow}
    \ffigbox[\FBwidth]{\caption{image1}}{\includegraphics[width=2cm,height=8cm]{image1a}}%
    \ffigbox[\FBwidth]{\caption{invisible?}}
    {
        \ffigbox[\FBwidth]{\caption{image1b}}{\includegraphics[width=2cm,height=2cm]{image1b}}%
        \ffigbox[\FBwidth]{\caption{image1c}}{\includegraphics[width=2cm,height=5cm]{image1c}}%
    }
\end{subfloatrow}
}{\caption*{image1}}
\end{figure}

\begin{figure}
\ffigbox[\FBwidth]{ 
\begin{subfloatrow}
    \ffigbox[\FBwidth]{\caption{image2}}{\includegraphics[width=2cm,height=8cm]{image2a}}%
    \ffigbox[\FBwidth]{\caption{invisible?}}
    {
        \ffigbox[\FBwidth]{\caption{image2b}}{\includegraphics[width=2cm,height=2cm]{image2b}}%
        \ffigbox[\FBwidth]{\caption{image2c}}{\includegraphics[width=2cm,height=5cm]{image2c}}%
        \ffigbox[\FBwidth]{\caption{image2d}}{\includegraphics[width=2cm,height=3cm]{image2d}}%
    }
\end{subfloatrow}
}{\caption*{image2}}
\end{figure}
\end{document}
Guntram
  • 105

1 Answers1

3

In this case, a simpler solution is to use \subcaptionbox and two minipages (in the code below I suppressed packages that were not necessary for the proposed solution):

\documentclass[]{article}
\usepackage[demo]{graphicx}
\usepackage{subcaption}

\begin{document}

\begin{figure}
\centering
\begin{minipage}[b]{2cm}
  \subcaptionbox{image2a}{\includegraphics[width=2cm,height=8cm]{image2a}}
\end{minipage}\quad%
\begin{minipage}[b]{2cm}
  \subcaptionbox{image2b}{\includegraphics[width=2cm,height=2cm]{image2b}}
  \subcaptionbox{image2c}{\includegraphics[width=2cm,height=5cm]{image2c}}
  \subcaptionbox{image2d}{\includegraphics[width=2cm,height=3cm]{image2d}}
\end{minipage}
\caption*{image2}
\end{figure}

\end{document}

enter image description here

Warning (for those who need it): the demo option for graphicx simply replaces actual figures with black rectangles; do not use that option in actual documents.

Gonzalo Medina
  • 505,128