Vertikale Ausrichtung von p-Multirow in Tabu

Vertikale Ausrichtung von p-Multirow in Tabu

Ich verwende tabuzum Erstellen meiner Tabellen. In einer der Tabellen möchte ich eine multirowZeile haben und deren Inhalt vertikal nach oben ausrichten.

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

Dies ist der grundlegende 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}

Ich habe mehrere Lösungen gefunden, um eine XSpalte vertikal auszurichten, aber nicht eine pSpalte.

Antwort1

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

Bildbeschreibung hier eingeben

verwandte Informationen