I'm trying to create a pretty straightforward table with tabularx that should look like this:
A1 A2 A3 MULTIROW
B1 B2 B3
C1 C2 C3
My problem is that I can't make the text in the multirow cell fit inside the page margin (the text is printed in one single line and does not respect the cell width). Also, I want the text top aligned and not centered. Here is my code:
\begin{flushleft}
\begingroup
\def\arraystretch{1.5}
\begin{tabularx}{\textwidth}{c l l X}
A1 & A2 & A3 & \multirow{3}{*}{multirow text}\\
B1 & B2 & B3 \\
C1 & C2 & C3 \\
\end{tabularx}
\endgroup
\end{flushleft}
t
option as follows. Also, you can replace*
with=
in order to allow the contents of the multirow to adapt to the width of the surrounding column. With*
the multirow cell is as wide as its contents, resulting in an overflow into the right margin if your contents are quite long.\multirow[t]{3}{=}
.