# How to specify the row height in LaTeX table?

I want to create a LaTeX table with three rows which have different row heights. How can I do this?

The following code

\renewcommand\arraystretch{2.4} \setlength\minrowclearance{2.4pt}


seems make each row has the same height.

-
you could probably use \rule{0pt}{<lenght>} to create a line with 0 width but a certain vertical length. –  Martin H Jun 1 '11 at 7:32

Try this:

\documentclass{article}
\begin{document}
\begin{tabular}{cc}
\hline
hi & tall one\\[10ex]
\hline
hi & medium one\\[5ex]
\hline
hi & standard one\\
\hline
\end{tabular}
\end{document}


So you can specify the height of a row with the optional argument

-
how do you vertically centralize the elements in a cell, using the [ex] optional argument?! –  Ivan Machado Nov 21 '12 at 22:57
Using \\[<space>] adds space to the end of the last cell, so if the last cell of each row has significantly different contents, then the row height can vary. This is easily solved by adding an extra column, and keeping it empty. Then \\[<space>] always makes the row <space> as a minimum. –  Nathanael Farley Dec 17 '12 at 11:03
@NathanaelFarley This won't help when you have hlines as then adding an additional column will produce extra lines at the end. Additionally, it still keeps the contents vertically spaced near the top rather than within the cell in the center vertically –  Aram Papazian Aug 15 '14 at 13:07
@AramPapazian This can be fixed by using columns like {cc@{}c@{}} as the @{} will make the space either side of the empty column 0 pt. –  Nathanael Farley Aug 18 '14 at 9:12

a table with horizontally and vertically centered elements with package easytable:

\documentclass{article}
\usepackage[thinlines]{easytable}
\begin{document}

\begin{TAB}(e,10ex,5ex){|c|c|}{|c|c|c|}
hi & tall one\\
hi & medium one\\
hi & standard one\\
\end{TAB}

\end{document}


-
am I going insane or are all those exactly the same height? –  puk Apr 18 '14 at 1:02