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.

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.

share|improve this question
5  
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

2 Answers 2

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

share|improve this answer
7  
how do you vertically centralize the elements in a cell, using the [ex] optional argument?! –  Ivan Machado Nov 21 '12 at 22:57
4  
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

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}

enter image description here

share|improve this answer
4  
am I going insane or are all those exactly the same height? –  puk Apr 18 at 1:02

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.