4

I am trying to set up the following layout on a figure in a document typeset with the memoir class:

                                        enter image description here

I have tried using \\ within the \subbottom environment, but this doesn't seem to work

\begin{figure}[!t]
\subbottom[]{
\includegraphics[width=0.45\linewidth]{img1.png}\\[0.2cm]
\includegraphics[width=0.45\linewidth]{img2.png}}
\hfill \subbottom[]{
\includegraphics[width=0.45\linewidth]{img3.png}\\[0.2cm]
\includegraphics[width=0.45\linewidth]{img4.png}}
\end{figure}

LaTeX seems to ignore my \\[0.2cm] commands and instead it tries to print images in the same row.

Is there a way to do this when using the float commands provided by the memoir class? (such as \subbottom).

1 Answer 1

5

You can use minipages inside \subbottom:

\documentclass{memoir}
\usepackage[demo]{graphicx}

\newsubfloat{figure}
\newsubfloat{table}
\begin{document}

\begin{figure}
\subbottom[]{%
\begin{minipage}{.45\textwidth}
\includegraphics[width=\linewidth]{img1.png}\\[0.2cm]
\includegraphics[width=\linewidth]{img2.png}
\end{minipage}
}%
\hfill \subbottom[]{%
\begin{minipage}{.45\textwidth}
\includegraphics[width=\linewidth]{img1.png}\\[0.2cm]
\includegraphics[width=\linewidth]{img2.png}
\end{minipage}
}%
\end{figure}

\end{document}

enter image description here

The demo option was only used to produce black rectangles instead of actual figures; do nota use that option in your actual document.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .