2

As described in answers to this question, the following code:

\documentclass{memoir}
\newsubfloat{figure}
\begin{document}
\begin{figure}[H]
\centering%
\begin{tabular}{lr}
\begin{tabular}{c}%
\subbottom[A]{\rule{0.3\linewidth}{100pt}} \\
\subbottom[B]{\rule{0.3\linewidth}{100pt}}
\end{tabular}
&
\subbottom[C]{\rule{0.6\linewidth}{230pt}}
\end{tabular}
\caption{D}%
\end{figure}
\end{document}

Leads to significant misalignment. How do I fix it?

enter image description here

Neil G
  • 17,947
  • tabular defaults to aligning by center, although you can select top (first baseline) or bottom (last baseline). Images and rule align to the bottom. – John Kormylo Feb 07 '14 at 04:18
  • @JohnKormylo: I'm not sure I understand what happened, but thanks for the explanation. – Neil G Feb 07 '14 at 04:28
  • Basically, the tabular on the left aligned its center to the bottom of the rule on the right. In the answer below, the bottom of the tabular on the left aligned with the bottom or the rule on the right. – John Kormylo Feb 07 '14 at 04:31

2 Answers2

3

Use b for the optional argument in the inner tabular:

\documentclass{memoir}
\newsubfloat{figure}
\begin{document}
\begin{figure}[H]
\centering%
\begin{tabular}{@{}lr@{}}
\begin{tabular}[b]{c}%
\subbottom[A]{\rule{0.3\linewidth}{100pt}} \\
\subbottom[B]{\rule{0.3\linewidth}{100pt}}
\end{tabular}
&
\subbottom[C]{\rule{0.6\linewidth}{230pt}}
\end{tabular}
\caption{D}%
\end{figure}
\end{document}

enter image description here

I'd however, suggest minipages of fixed height inside the tabular (again, with bottom alignment):

\documentclass{memoir}
\newsubfloat{figure}
\begin{document}
\begin{figure}[H]
\centering%
\begin{tabular}{@{}lr@{}}
\begin{minipage}[c][230pt][b]{0.3\linewidth}%
\subbottom[A]{\rule{\linewidth}{100pt}}\\[9.5pt]
\subbottom[B]{\rule{\linewidth}{100pt}}
\end{minipage}
&
\begin{minipage}[c][230pt][b]{0.6\linewidth}%
\subbottom[C]{\rule{\linewidth}{230pt}}
\end{minipage}
\end{tabular}
\caption{D}%
\end{figure}
\end{document}

enter image description here

Gonzalo Medina
  • 505,128
1

Just for fun. For some reason, the first subbottom has a 5pt smaller top margin than all subsequent subbottoms.

\documentclass{memoir}
\usepackage{tikz}

\newsubfloat{figure}
\begin{document}
\begin{figure}[H]
\centering%
\begin{tikzpicture}
\path
(0,0) node(C){\subbottom[C]{\rule{0.6\linewidth}{230pt}}}
(C.north west) +(0,5pt) node[below left]
{\subbottom[A]{\rule{0.3\linewidth}{100pt}}}
(C.south west) node[above left]
{\subbottom[B]{\rule{0.3\linewidth}{100pt}}};
\end{tikzpicture}
\caption{D}%
\end{figure}
\end{document}

figure

John Kormylo
  • 79,712
  • 3
  • 50
  • 120
  • Great general solution. Did not know you could do this! – Neil G Feb 08 '14 at 20:00
  • It's based on experiments I did while working on http://tex.stackexchange.com/questions/150367/best-way-to-make-family-photo-album-in-latex/150481#150481 – John Kormylo Feb 09 '14 at 16:47