Suppose, I want to create a table like this:
I decided to use \multirow
with \newline
. But the \multirow
cell is not stretched vertically:
Code:
\documentclass{article}
\usepackage[a5paper]{geometry}
\usepackage{array}
\usepackage{multirow}
\usepackage{hhline}
\setlength{\parindent}{0cm}
\begin{document}
\begin{tabular}{|m{2cm}|m{2cm}|}
\hline
\multirow{2}{2cm}{line 1
\newline
line 2 line 2 line 2 line 2} &
1\\
\hhline{|~|-|}
& 2\\
\hline
text & text\\
\hline
\end{tabular}
\end{document}
How to fix?
Best Answer
It often works better to make the large entry a normal cell and then separately arrange the vertical stacking of the other material with a nested tabular or, here just as paragraphs.
You may need to adjust the vertical spacing to your needs. As suggested in chat, this produces a 2 closer to the line, and makes the line extend to touch the vertical rules.