0

enter image description here

There are already a few questions regarding this layout:

However, none of them seems to consider aligning the subcaptions.

(1) A workaround is to add empty lines.

(2) I was trying to resolve this properly. For a simple layout with two or more figures next to each other, one can use the command \subcaptionbox from the package subcaption.sty.

I have created my own attempt using the \subcaptionbox command in minipages. As far as I can tell there is only a small problem in the subcaption of image 2 which is not centered if it spans over a second line as the other subcaptions do. This issue disappears if you remove the second line from this subcaption

\documentclass[draft]{article}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{mwe}
\newsavebox{\bigimage}

\begin{document}

\begin{figure}
  \sbox{\bigimage}{%
    \subcaptionbox
      {large image}
      [0.5\linewidth]
      {\includegraphics[width=\linewidth,height=350pt]{example-image-c}}%
  }
  \begin{minipage}[b][\ht\bigimage]{0.5\linewidth}
  \subcaptionbox{small image 1}[\linewidth]{\includegraphics[width=\linewidth]{example-image-a}}
  \vfill

  \subcaptionbox{small image 2\\ with a second caption line}[\linewidth]{\includegraphics[width=\linewidth]{example-image-b}}
  \end{minipage}%
  \begin{minipage}[b][\ht\bigimage]{0.5\linewidth}
  \usebox{\bigimage}
  \end{minipage}
  \caption{caption for figure}
  \label{fig:figure}
\end{figure}

\end{document}

enter image description here

Update

I just noticed a second issue regarding the numbering of the subcaptions. Figure 1 should have (a), Figure 2 (b) and Figure 3 (c).

Hotschke
  • 5,300
  • 5
  • 33
  • 63
  • My issue with the subcaption of image 2 is actually the intended behaviour. Simiply add to the preamble \captionsetup[subfigure]{justification=centering}. – Hotschke Jun 08 '18 at 08:26
  • A helpful answer was https://tex.stackexchange.com/a/101624/8917 – Hotschke Jun 08 '18 at 08:33

2 Answers2

1

Package stackengine

Using the answer by Steven B. Segletes

\documentclass[draft]{article}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{stackengine}
\usepackage{mwe}

\begin{document}
\captionsetup[subfigure]{justification=centering}
\begin{figure}
  \centering
  \def\figa{\includegraphics[width=0.4999\linewidth]{example-image-a}}
  \def\figb{\includegraphics[width=0.4999\linewidth]{example-image-a}}
  \def\figc{\includegraphics[width=0.4999\linewidth,height=350pt]{example-image-c}}
  \def\capa{subfig a caption}
  \def\capb{subfig b caption\\ which may be longer}
  \def\capc{subfig c caption}
  \savestack{\capfiga}{\subcaptionbox{\capa\label{fg:a}}{\figa}}
  \savestack{\capfigb}{\subcaptionbox{\capb\label{fg:b}}{\figb}}
  \savestack{\capfigc}{\subcaptionbox{\capc\label{fg:c}}{\figc}}
  \def\hgap{0ex}
  \stackon%
    [\heightof{\figc}-\heightof{\figb}-\heightof{\capfiga}-\depthof{\capfiga}]%
    {\capfigb}{\capfiga}\hspace{\hgap}\capfigc%
  \caption{This is my figure\label{fg:}}
\end{figure}

\end{document}

enter image description here

Hotschke
  • 5,300
  • 5
  • 33
  • 63
1

With saveboxes

\documentclass[draft]{article}
\usepackage{graphicx}
\usepackage{subcaption}
\captionsetup[subfigure]{justification=centering}
\usepackage{mwe}
\newsavebox{\topleftimage}
\newsavebox{\bottomleftimage}
\newsavebox{\bigimage}

\begin{document}
\begin{figure}
  \sbox{\topleftimage}{%
    \subcaptionbox
      {small image 1}
      [0.5\linewidth]
      {\includegraphics[width=\linewidth]{example-image-a}}%
  }
  \sbox{\bottomleftimage}{%
    \subcaptionbox
      {small image 2\\ with a second caption line}
      [0.5\linewidth]
      {\includegraphics[width=\linewidth]{example-image-b}}%
  }
  \sbox{\bigimage}{%
    \subcaptionbox
      {large image}
      [0.5\linewidth]
      {\includegraphics[width=\linewidth,height=350pt]{example-image-c}}%
  }
  \begin{minipage}[b][\ht\bigimage]{0.5\linewidth}
  \usebox{\topleftimage}
  \vfill
  \usebox{\bottomleftimage}
  \end{minipage}%
  \begin{minipage}[b][\ht\bigimage]{0.5\linewidth}
  \usebox{\bigimage}
  \end{minipage}
  \caption{caption for figure}
  \label{fig:figure}
\end{figure}
\end{document}

enter image description here

Hotschke
  • 5,300
  • 5
  • 33
  • 63