Subfigures in subfigures – proper alignment

floatssubfloats

I would like to place three (or more) images such that two images (or four/more) are stacked over each other, while the remaining image is put as a separate column, spanning over all stacked rows. My initial approach was using subfigure inside subfigure, resulting in the following MWE:

\documentclass[]{article}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{graphicx}
%opening
\title{}
\author{}

\begin{document}
\begin{figure}[ht]
    \begin{subfigure}[t]{.2\linewidth}
        \includegraphics[width=\linewidth, height=4\linewidth]{example-image-a}
        \caption{TBA}
    \end{subfigure}\hfill%
    \begin{subfigure}[t]{.78\linewidth}
        \begin{subfigure}[t]{.5\linewidth}
            \includegraphics[width=\linewidth]{example-image-b}
            \caption{TBD}
        \end{subfigure}\hfill%
        \begin{subfigure}[t]{.45\linewidth}
            \includegraphics[width=\linewidth]{example-image-b}
            \caption{TBD}
        \end{subfigure}\hfill%
        
        \begin{subfigure}[t]{.5\linewidth}
            \includegraphics[width=\linewidth]{example-image-b}
            \caption{TBD}
        \end{subfigure}\hfill%
        \begin{subfigure}[t]{.45\linewidth}
            \includegraphics[width=\linewidth]{example-image-b}
            \caption{TBD}
        \end{subfigure}
    \end{subfigure}
\end{figure}
\begin{figure}[ht]
    \begin{subfigure}[t]{.2\linewidth}
        \includegraphics[width=\linewidth, height=4\linewidth]{example-image-a}
        \caption{TBA}
    \end{subfigure}\hfill%
    \begin{subfigure}[t]{.78\linewidth}
        \begin{subfigure}[t]{.9\linewidth}
            \includegraphics[width=\linewidth]{example-image-b}
            \caption{TBD}
        \end{subfigure}\hfill%
        
        \begin{subfigure}[t]{.9\linewidth}
            \includegraphics[width=\linewidth]{example-image-b}
            \caption{TBD}
        \end{subfigure}\hfill%
    \end{subfigure}
\end{figure}
\end{document}

The second figure illustrates one issue: Figure A which should span along both example figures B is aligned with the caption of the upper fig. B, but I would rather have it aligned with the caption of bottom fig. B.

enter image description here

How can I do that? When moving fig. A to the end of the subfigure-structure, it just appears to the right of the block consisting of figures B, but is still aligned with the upper caption, not the lower one. Or is it not possible at all?

Best Answer

Simply change align argument to b (bottom) for second block of subfigures:

\begin{subfigure}[b]{.78\linewidth}


enter image description here

\documentclass[]{article}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{graphicx}
%opening
\title{}
\author{}

\begin{document}
\begin{figure}[ht]
    \begin{subfigure}[t]{.2\linewidth}
        \includegraphics[width=\linewidth, height=4\linewidth]{example-image-a}
        \caption{TBA}
    \end{subfigure}\hfill%
    \begin{subfigure}[b]{.78\linewidth}
        \begin{subfigure}[t]{.5\linewidth}
            \includegraphics[width=\linewidth]{example-image-b}
            \caption{TBD}
        \end{subfigure}\hfill%
        \begin{subfigure}[t]{.45\linewidth}
            \includegraphics[width=\linewidth]{example-image-b}
            \caption{TBD}
        \end{subfigure}\hfill%
        
        \begin{subfigure}[t]{.5\linewidth}
            \includegraphics[width=\linewidth]{example-image-b}
            \caption{TBD}
        \end{subfigure}\hfill%
        \begin{subfigure}[t]{.45\linewidth}
            \includegraphics[width=\linewidth]{example-image-b}
            \caption{TBD}
        \end{subfigure}
    \end{subfigure}
\end{figure}
\begin{figure}[ht]
    \begin{subfigure}[t]{.2\linewidth}
        \includegraphics[width=\linewidth, height=4\linewidth]{example-image-a}
        \caption{TBA}
    \end{subfigure}\hfill%
    \begin{subfigure}[b]{.78\linewidth}
        \begin{subfigure}[t]{.9\linewidth}
            \includegraphics[width=\linewidth]{example-image-b}
            \caption{TBD}
        \end{subfigure}\hfill%
        
        \begin{subfigure}[t]{.9\linewidth}
            \includegraphics[width=\linewidth]{example-image-b}
            \caption{TBD}
        \end{subfigure}\hfill%
    \end{subfigure}
\end{figure}
\end{document}