I have a big table with a problem, when I want to rotate the text in a \multirow
cell, the text is placed outside and is bigger than the dimensions of the cell, I took some advice from here, using\parbox
, and then \rotatebox
. But I don't get good results.
\documentclass{article}
\usepackage{array,multirow,graphicx}
\begin{document}
\begin{table}[H]
\centering
\begin{tabular}{|c|l|r|r|r|r|}
\hline
& \multicolumn{1}{|c|}{Text} & \multicolumn{1}{|c|}{Text} & \multicolumn{1}{|c|}{Text} & \multicolumn{1}{|c|}{Text} & \multicolumn{1}{|c|}{text}\\
\hline
\rotatebox{90}{\parbox{2mm}{\multirow{3}{*}{rota}}} & text &&&&\\
& text &&&&\\
& text &&&&\\
\hline
\end{tabular}
\end{table}
\end{document}
Which results in:
Best Answer
Put
\rotatebox
inside like:Code:
I have eliminated some spurious vertical lines in the title and introduced the origin for rotation. However, the idea of introducing a
parbox
did not get in to my head as this may not be needed for the present MWE. In case you have other uses in your actual code, you may use the alignment specifiers toparbox
(Here[t]
).