I am creating a table and, after using \multirow
, I want to rotate the text of this column and have it centered vertically and horizontally inside its cell. The code I am using would be similar to this one:
\begin{tabular}{ |c|c|c| }
\hline
\multirow{8}{*}{Text} & row 1 & row 1 \\
& row 2 & row 2 \\
& row 3 & row 3 \\
& row 4 & row 4 \\
& row 5 & row 5 \\
& row 6 & row 6 \\
& row 7 & row 7 \\
& row 8 & row 8 \\ \hline
\end{tabular}
Thanks.
Best Answer
You can do this with or without
multirow
. Usegraphicx
for the rotation via\rotatebox[<opts>]{<deg>}{<stuff>}
:With
multirow
you don't need to worry about the placement, while without you need to place the text in the appropriate location, and perhaps lower/raise it into position. Also, you have to flatten the content (done by using the[0pt][0pt]
options to\raisebox
) so it doesn't impede in the row height - something that is naturally done bymultirow
.There might be a slight discrepancy between the two methods, but it is negligible.