4

I'm using tabu to create my tables. In one of the tables, I would like to have a multirow row and vertically align its content to top.

-------------- ---------------------------------
This is p col  First row
               ---------------------------------
               Second row
               ---------------------------------
               Third row
-------------- ---------------------------------
This is p col  First row
               ---------------------------------
               Second row
-------------- ---------------------------------

This is the basic latex code

\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}

I found several solutions to vertically align a X column, but not a p column.

1 Answer 1

4
\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}

enter image description here

You must log in to answer this question.

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