[Tex/LaTex] One half spacing in tables

line-spacingtables

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.

Best Answer

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}