I have a table in LyX document. And I'm using multirow to span text across multiple rows. For example I might want the text to span across 2 rows, the problem occurs when it doesn't fit, then it just goes over the cell border (to third cell).
Is there a way to set row height manually for single row?
Or even better could is there a way to update multirow such that it will automatically enlarge cells when text inside them is too big?
This is the Lyx source for it:
\begin{tabular}{|c|c|}
\hline
a & b\tabularnewline
\hline
\hline
\multirow{2}{2cm}{Text spanning over two fields} & \tabularnewline
\cline{2-2}
& \tabularnewline
\hline
\end{tabular}
Best Answer
You have to make sure, that there is enough room for the multirow. In the following example I increase the height of the second colums with a strut (
sr
). The code will be:I gave the
\rule
a depth to make the items of the second column vertically centered.