3

This question already has an answer here:

I'm using the tabularx package from within memoir for creating a table. I'm trying to set the row height and found for tabular the command

\setlength{\extrarowheight}{40pt}

However, with my tabularx table it doesn't seem to work and I can't find any way to do it (except maybe by manually setting each newline to a certain height)

Is there a better way to set the row height of all rows within a tabularx?

marked as duplicate by Werner, barbara beeton, Thorsten, lockstep, Mensch Jul 17 '13 at 17:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • See Column padding in tables – Werner Jul 17 '13 at 14:12
  • Ahhhh! Come on, that was an easy one! Sorry! – navige Jul 17 '13 at 14:13
  • Did that solve your problem? If so, we could close this question as a duplicate. Give some feedback. – Werner Jul 17 '13 at 14:49
9

\extrarowheight

The dimen register \extrarowheight is provided by package array, which is automatically loaded by package tabularx. Thus \extrarowheight works as expected in the following example:

\documentclass{article}
\usepackage{tabularx}
\setlength{\extrarowheight}{40pt}
\begin{document}
\noindent
\begin{tabularx}{\linewidth}{X}
Hello\\
World
\end{tabularx}
\end{document}

Result

\arraystretch

A different method is the redefinition of the factor \arraystretch. It is applied to the automatic struts, inserted in the tabular, see the question "Column padding in tables", found by Werner.

  • Strangely extrarowheight doesn't work for me, but arraystretch does. Maybe interference with another package? – navige Jul 17 '13 at 15:53
  • 1
    @navige: Please create a minimal working example (MWE) that shows the problem. – Heiko Oberdiek Jul 17 '13 at 16:48

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