我用它tabu
来创建表格。在其中一个表格中,我想设置一行multirow
并将其内容垂直对齐到顶部。
-------------- ---------------------------------
This is p col First row
---------------------------------
Second row
---------------------------------
Third row
-------------- ---------------------------------
This is p col First row
---------------------------------
Second row
-------------- ---------------------------------
这是基本的乳胶代码
\begin{table}
\tabulinesep =_3pt^3pt
\begin{tabu} to \textwidth{p{4cm} X}
\toprule
\multirow{2}{4cm}{This is p col} & First row \\
& Second row \\
\bottomrule
\end{tabu}
\end{table}
我找到了几种垂直对齐列的解决方案X
,但没有找到任何p
列。
答案1
\documentclass{article}
\usepackage{tabu,multirow,booktabs}
\begin{document}
\begin{table}
\tabulinesep =_3pt^3pt
\begin{tabu} to \textwidth{p{4cm} X}
\toprule
\multirow{2}[-4]{4cm}{This is p col} & First row \\
& Second row \\
\bottomrule
\end{tabu}
\end{table}
\end{document}