表格内的表格会破坏相邻单元格的垂直对齐!

表格内的表格会破坏相邻单元格的垂直对齐!

我在表格中嵌套了一张表格,如下所示:

\begin{tabular}{p{1in}||p{5in}}
    \hline
    This should be on top. & \begin{tabular}{@{\extracolsep{\fill}}lr}
                    Thing1 & Thing2 \\
                    Thing3 & Thing4 \\
                    Thing5 & Thing6 \\
                    Thing7 & Thing8 \\
                 \end{tabular} \\
    \hline
\end{tabular}

它看起来像这样:

http://i.imgur.com/Pf1Ihn7.png

但既然This should be on topp单元格中,它不应该留在顶部吗?如何才能让它看起来像这样?:

在此处输入图片描述

答案1

尝试

\begin{tabular}{p{1in}||p{5in}}
\hline
This should be on top. & \begin{tabular}[t]{@{\extracolsep{\fill}}lr}
                Thing1 & Thing2 \\
                Thing3 & Thing4 \\
                Thing5 & Thing6 \\
                    Thing7 & Thing8 \\
             \end{tabular} \\
    \hline
\end{tabular}

[t]请注意其中的额外内容。

相关内容