Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How to increase the height of the rows in a LaTeX table?

share|improve this question
3  
\setlength\extrarowheight{5pt} and adjust 5pt to your needs –  karlkoeller Feb 8 at 8:07
    
Just one more question how to place the text in the middle but increasing the height. –  user1965914 Feb 8 at 8:09
1  
Instead of adjustments to \extrarowheight just modify \arraystretch, e.g. by \renewcommand{\arraystretch}{1.2}. –  Thorsten Donig Feb 8 at 8:21
add comment

2 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

enter image description here

share|improve this answer
add comment
\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}

enter image description here

share|improve this answer
    
Thank you! Can you also help in this tex.stackexchange.com/questions/159259/… –  user1965914 Feb 8 at 8:58
    
done. See answer –  Herbert Feb 8 at 9:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.