What's the difference between these two in a table environment?

I've seen they cause somewhat the same result, but I have no idea what is the difference, except that arraystretch is used in a scale factor and extrarowheight seems to be added in length.

  • 2
    Great question. I note that Lamport mentions \arraystretch in his documentation, but not \extrarowheight (I've scribbled it into my book on the same page). It might lead us to believe that they are functionally equivalent alternatives, but I'm sure David Carlisle will straighten us out :^) – Steven B. Segletes May 15 '13 at 13:20

It's the difference between adding and multiplying.

\arraystretch is part of the LaTeX format it multiplies the height and depth of the "strut" used to space out table rows by the specified factor.

\extrarowheight is an extra parameter added by the array package which adds a specified length to the height of the strut used for padding table rows.

If you want to keep text away from horizontal lines without disturbing everything else too much \extrarowheight is usually better.

  • Isn't there a difference with multi-line table cells (@p{...})? IIRC \arraystretch works like \baselinestretch, adding space between such lines. – alexis May 15 '13 at 16:19
  • 1
    @alexis the commands just have the effect that I said. \arraystretch only affects the strut added to the table row it does not affect the baseline of lines within a p column. – David Carlisle May 15 '13 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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