How does one increase the height of the rows in a LaTeX table?
4 Answers
To increase the row height in a table you can either increase the \extrarowheight through something like
\setlength\extrarowheight{5pt}
or stretch the row through something like
\renewcommand{\arraystretch}{1.2}
as Thorsten Donig points out in the above comment.
IMHO, the best way to increase the height and keep the vertical alignment is to add the space when you break the row with \\, for example with \\[5pt].
This is an example (I've exaggerated a little with 50pt here)
\documentclass{article}
\usepackage{array}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
\newcolumntype{N}{@{}m{0pt}@{}}
\begin{document}
\begin{table}[ht]
\begin{tabular}{|M{4cm}|M{4cm}|N}
\hline
\textbf{Text} & \textbf{Text} &\\[50pt]
\hline
text & text&\\[50pt]
\hline
\end{tabular}
\end{table}
\end{document}
Note that I've added a column as the last one defined as @{}m{0pt}@{} to avoid the issue described here: Vertical alignment in table: m-column, row size - problem in last column.
Output

- 124,410
-
5I prefer the
\renewcommand{\arraystretch}{1.2}. I did not see how to use the other method and still set the horizontal alignment, i.e., l/c/r. – Steven C. Howell Nov 12 '15 at 02:50 -
3@stvn66 For left alignment, define
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}m{#1}}and, for right,\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}m{#1}}– Sterry Dec 21 '15 at 18:32 -
Unfortunately, the author-preferred solution doesn't work at all, at least not on my machine. 112 upvotes got me and I tried to incorporate this thing without trying. I hope that other people see this comment before trying it out in their work, and try the solution to see if it works at all, despite >100 votes on it. – Utkan Gezer Dec 01 '18 at 21:43
-
Using \newcolumntype{N}{@{}m{0pt}@{}} to create an extra 'null' cell is an ingenious idea. Works well – V-Red Aug 02 '19 at 19:51
-
-
should I put
[5pt]beginning of the row as well to make the text centered? – alper Oct 03 '22 at 15:06 -
1@alper I added \vspace{5pt} in the first column and then it works. Otherwise, it doesn't work, at least in my latex environment. – Doris Feb 12 '24 at 22:29
Super Simple Solution
I faced similar problem, & found a (not so conventional but) simple way to solve it. Wish, it will help others too.
I had a table like this-
\begin{tabular}{c|ccc}
$x$ & 1 & 2 & 3\\ \hline
$f(x)$ & 1 & 2 & 3
\end{tabular}
And, I wanted to put some extra space before the second row-
So, I inserted an extra empty line-
\begin{tabular}{c|ccc}
$x$ & 1 & 2 & 3\\ \hline
\\
$f(x)$ & 1 & 2 & 3
\end{tabular}
But, now I had put too much space there-
So, I used negative line spacing to reduce it-
\begin{tabular}{c|ccc}
$x$ & 1 & 2 & 3\\ \hline
\\[-1em]
$f(x)$ & 1 & 2 & 3
\end{tabular}
Great! everything was perfect-
- 1,301
- 1
- 9
- 9
-
23I really like this solution because it's simple and easy to control. One note is that if you have vertical lines between your other columns you have to add "&&&" as many times as it takes so that the vertical lines connect down. – MsTiggy Jul 23 '16 at 22:38
-
8To complete the comment above: avoid disconnection of multiple vertical lines by using:
&&&\\[-1em]– hanna Mar 10 '18 at 22:50 -
I appreciate this very simple answer, but it resulted in gaps in the vertical lines separating columns. How do I fix this? – sodiumnitrate Mar 14 '18 at 20:25
-
The arraystretch solution keeps the vertical bars looking normal: https://tex.stackexchange.com/a/31681/192461 – Karim Sonbol Feb 27 '20 at 13:49
-
-
1Has anyone noticed the double (thicker) vertical line on the second row? This solution may be easy but far from elegant and perfect... – Rusty Gear Dec 10 '20 at 12:52
Use package easytable
\documentclass{article}
\usepackage[thinlines]{easytable}
\begin{document}
\begin{TAB}(r,1cm,2cm)[5pt]{|c|c|}{|c|c|c|}% (rows,min,max)[tabcolsep]{columns}{rows}
hi & tall one \\
hi & medium one \\
hi & standard one\\
\end{TAB}
\end{document}

-
Thank you! Can you also help in this http://tex.stackexchange.com/questions/159259/latex-table-adjustments?noredirect=1#comment363655_159259 – user1965914 Feb 08 '14 at 08:58
-
1
-
1But I want one that can automatically span width, and break pages, and ... (My point is that I should have to use a different environment to modify row spacing ;-) ) – lmat - Reinstate Monica Aug 05 '16 at 13:16
-
-
I would like to add this documentation to this answer: https://www.ctan.org/pkg/easytable – I.Step Jan 27 '22 at 20:51
Use \rule{0pt}{value} to change the single row height to value.
- 423
- 4
- 7
-
See https://tex.stackexchange.com/a/554661/250119 for an example where it's used. – user202729 May 06 '22 at 16:10



\extrarowheightjust modify\arraystretch, e.g. by\renewcommand{\arraystretch}{1.2}. – Thorsten Donig Feb 08 '14 at 08:21