3

What is the easiest way to get one and a half line spacing in all my tables? I have the setspace package loaded, if that helps. The relevant bits of my preamble currently read:

\usepackage{setspace}
\onehalfspacing
\usepackage[font={onehalfspacing}]{caption}

This gives me one half spacing for my body text and the captions of figures/tables/etc.

  • \extrarowheight? Of course, would be easier with an MWE. – cfr Nov 24 '15 at 3:50
  • As far as I can tell, \extrarowheight adds a fixed amount of space, so is not a general solution that works for all text sizes. – Ulysses Nov 24 '15 at 5:30
  • Something similar is \renewcommand{\arraystretch}{X} where X is some number. 1 appears to be the default which reproduces single spacing. I don't know what X needs to be to reproduce one half spacing, only that 1.5 isn't it (too big). – Ulysses Nov 24 '15 at 5:37
  • According to setspace, it is ~1.25, depending on the font size. – Bernard Nov 24 '15 at 11:34
2

The answer depends a bit on what "onehalfspacing" entails. If it's equivalent to \setstretch{1.5}, you should try \renewcommand\arraystretch{1.5}.

If your tabular-like envrionments are located inside table environments, and if you're using the terminology of the setspace package and your main font size is 10pt, you should try \renewcommand\arraystretch{1.25}; for 11pt and 12pt main font sizes, you should use values of 1.213 and 1.241, respectively.

In the screenshot below, the left-hand and right-hand tabular environments are typeset before and after a \renewcommand\arraystretch{1.5} is executed, respectively. (The default value is 1.)

enter image description here

\documentclass{article}
%define a dummy table
\newcommand\mytab{%
   \begin{tabular}[t]{lll}
   \hline
   a & b & c\\
   \hline
   d & e & f \\
   \hline
   h & i & k \\
   \hline
\end{tabular}}
\begin{document}

\mytab
\quad
\renewcommand\arraystretch{1.5}
\mytab

\end{document}
  • Thank you for your help. Could you clarify how you got the numbers 1.25, 1.213, etc? – Ulysses Nov 24 '15 at 6:34
  • 1
    @Ulysses - I found these numbers inside the file setspace.sty, in the section that defines \onehalfspacing. – Mico Nov 24 '15 at 6:49

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.