正如这个问题的答案中所述问题,以下代码:
\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}
导致严重错位。我该如何修复?
答案1
用于b
内部表格中的可选参数:
\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}
不过,我建议minipage
在内部使用固定高度tabular
(再次,与b
脚底对齐):
\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}
答案2
只是为了好玩。出于某种原因,第一个子底部的顶部边距比所有后续子底部的顶部边距都小 5pt。
\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}