# baselinestretch vs. setspace

In my preamble I use \renewcommand{\baselinestretch}{1.5} to get "onehalf" line spacing. This works fine.

Then I started to use tnote in a threeparttable.

I changed font size to \scriptsize as I think it is big enough for the table notes. I discovered that the line spacing on the \tnote \items is to big. I found an advice in the LaTeX wikibook that line spacing in lists can be changed using \itemsep1pt \parskip0pt \parsep0pt.

Unfortunately this only works when using the setspace package. But activating this package has an impact on all table/tabular environments in that all cells have a smaller padding.

How can I avoid this impact on tables or is there another possibility to change line spacing in lists, e.g. the tnote list in a threeparttable?

The MWE:

\documentclass[a4paper,12pt]{report}
% language settings
\usepackage[english,german,ngerman]{babel}
% Specifies which font encoding LaTeX should use.
\usepackage[T1]{fontenc}
% Allows the specification of an input encoding.
\usepackage[utf8]{inputenc}
% define page layout
\usepackage[left=3.5cm,right=3cm,top=3cm,bottom=2.5cm]{geometry}
% line spacing
%\renewcommand{\baselinestretch}{1.5}
% to set custiom line spacing
% http://en.wikibooks.org/wiki/LaTeX/Paragraph_Formatting#Line_Spacing
\usepackage{setspace}
%\onehalfspacing
%\doublespacing
\setstretch{1.5}
% intention of a paragraph
\parindent0pt
% Prints current chapter heading and the page number in the header on each page.
% Set of commands for inclusion of graphics.
\usepackage{graphicx}
\usepackage{epstopdf}
% used to control how to float figures
\usepackage{float}
% Use the harvard family of bibliographic styles.
\usepackage{harvard}
\bibliographystyle{agsm}
\citationmode{abbr}
% used to layout source file regions
\usepackage{listings}
% euro
\usepackage[left]{eurosym}
\usepackage{enumerate}
% used for nameref
\usepackage{nameref}
\usepackage{url}
% used to define color and colors for table cells
\usepackage{color}
\usepackage{colortbl}
% color definitions
\definecolor{dunkelgrau}{rgb}{0.8,0.8,0.8}
\definecolor{hellgrau}{rgb}{0.95,0.95,0.95}
% tables of three parts.
% http://www.tex.ac.uk/CTAN/macros/latex/contrib/threeparttable/threeparttable.pdf
\usepackage{threeparttable}
% for combining cells across rows
\usepackage{multirow}
% for combining cells across columns
\usepackage{multicol}
% for using array environments.
\usepackage{array}
% for using verbatim and comment environments
\usepackage{verbatim}
% for footnotes in tables
%\usepackage{tablefootnote}
%\usepackage{footnote}
%\makesavenoteenv{tabular}
% provide a 'landscape' environment
\usepackage{lscape}
% define vcentered colum types
\newcolumntype{C}{>{$\vcenter\bgroup\hbox\bgroup}c<{\egroup\egroup$}}
\newcolumntype{L}{>{$\vcenter\bgroup\hbox\bgroup}l<{\egroup\egroup$}}
\newcolumntype{R}{>{$\vcenter\bgroup\hbox\bgroup}r<{\egroup\egroup$}}
% provide blind test with \blindtext
\usepackage{blindtext}
%-----------------------------------------------------------------------------
\begin{document}
%-----------------------------------------------------------------------------
\setlength{\extrarowheight}{2pt}
%-----------------------------------------------------------------------------
\pagenumbering{arabic}
% -----------------------------------------------------------------------------
\chapter{Chapter 1}
% -----------------------------------------------------------------------------
\section{Section 1}
% -----------------------------------------------------------------------------
\blindtext
% -----------------------------------------------------------------------------
\begin{table}
\begin{center}
\begin{threeparttable}
\begin{tabular}{|L|C|C|C|C|C|C|C|}
\hline
\rowcolor{dunkelgrau}
\hline
first row\tnote{1}      & abcd abcd abcd        \\
\hline
second row\tnote{2}     & efgh efgh efgh        \\
\hline
third row               & ijkl ijkl ijkl        \\
\hline
\end{tabular}
\caption{Caption of table}
\label{table:labelOfTable}
\begin{tablenotes}
\item[1]{\scriptsize note 1}
\item[2]{\scriptsize note 2}
\end{tablenotes}
\end{threeparttable}
\end{center}
\end{table}
% -----------------------------------------------------------------------------
\end{document}

-
So you are using both \baselinestretch and setspace? You shouldn't do that. Use only setspace with \onehalfspacing at the beginning of the document which leaves spacing of tables, footnotes etc. at 1. You can then adjust the row height of a table by using \setlength{\extrarowheight}{2pt} in the preamble. –  Jörg Oct 25 '12 at 11:31
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. –  Corentin Oct 25 '12 at 11:34
i already tried to abondon \baselinestretch with 1.5 and use setspace with \onehalfspace, but baselinestretch gives 'more' space between lines. why do those two commands not give same line spacing? i used \setstretch{1.5} instead of \onehalfspace and \baselinestretch, which gives the same line spacing like \baselinestretch. And \extrarowheight just adds space on top of the rows? is it possible to add space to the whole row so that the text can be valigned center? –  Joysn Oct 25 '12 at 15:57
Yes, setting \baselinestretch to 1.5 gives more than \onehalfspacing (which is roughly equivalent to setting it to 1.2. That's because the whole idea of spacing in "multiples" (inherited from typewriters) doesn't play well with proper typesetting anyway. You can either use \doublespacing (about 1.6), or \setstretch{1.5} if that's what you really need. –  Paul Stanley Oct 25 '12 at 16:29
show 1 more comment

If you want to adjust the spacing of text you should avoid to change the \baselinestretch as it changes the spacing for everything in the document, including footnotes and tables, which is usually not desirable (of course, if you want that effect then \renewcommand{\baselinestretch}{1.5} is correct)

If you want a typographically pleasing result rely on the setspace package as this changes only the spacing of body text and the bibliography. As Paul Stanley noted, setting the document to \onehalfspace is less than a baselinestretch of 1.5. If you want the same effect use \setstretch{1.5}.

Now, with regards to your table there are several ways. First, do not use the center environment, but instead \centering. Second, you have specified way to many columns - your table only has two. If you a table with the same look and feel as your current one, the easiest way is to use \renewcommand{\arraystretch}{1.2} which adds space above and below each row. This document might be useful to you.

If you want an aesthetically pleasing table use the booktabs package and avoid vertical rules and horizontal rules apart from one each at the top, bottom and the head. If you do that, then \setlength{\extrarowheight}{3pt} is the best way to increase spacing and the table will look much nicer overall. The MWE below should clarify things:

\documentclass[12pt]{report}

\usepackage{setspace}
\setstretch{1.5}

\usepackage{threeparttable}
\usepackage{array}
\usepackage{booktabs}

\usepackage{blindtext}

\begin{document}

\begin{table}[ht!]
\renewcommand{\arraystretch}{1.2}
\centering% do not use the center environment
\begin{threeparttable}
\begin{tabular}{|l|c|}% you only have two columns
\hline
\hline
first row\tnote{1}      & abcd abcd abcd        \\
\hline
second row\tnote{2}     & efgh efgh efgh        \\
\hline
third row               & ijkl ijkl ijkl        \\
\hline
\end{tabular}
\caption{Caption of table}
\begin{tablenotes}
\item[1]{\scriptsize note 1}
\item[2]{\scriptsize note 2}
\end{tablenotes}
\end{threeparttable}
\end{table}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobor-
tis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent
imperdiet mi nec ante.

\begin{table}\begin{table}[h!]
\centering
\setlength{\extrarowheight}{5pt}
\begin{threeparttable}
\begin{tabular}{lc}
\toprule
\midrule
first row\tnote{1}      & abcd abcd abcd        \\
second row\tnote{2}     & efgh efgh efgh        \\
third row               & ijkl ijkl ijkl        \\
\bottomrule
\end{tabular}
\caption{A prettier Table}
\begin{tablenotes}
\item[1]{\scriptsize note 1}
\item[2]{\scriptsize note 2}
\end{tablenotes}
\end{threeparttable}
\end{table}

\end{document}


-
thanks for the explanation and the MWE. U are right, your table looks much nicer... Well, there are so many packages and i slowly get used to TeX. its my third document i prepare and its getting better :) –  Joysn Oct 26 '12 at 10:50
i removed now the horizontal rules, but i can not get rid of the vertical rules. How can i remove them? –  Joysn Oct 26 '12 at 10:57
Remove the vertical lines here \begin{tabular}{|l|c|} –  Jörg Oct 26 '12 at 10:59
ohh... too stupid :) thanks. –  Joysn Oct 26 '12 at 11:05