Moin,
I want the rowspacing behavior to be default. So this:
\usepackage{longtable}
% ... MAGIC ... %
\begin{longtable}{ccc}
entry1 & entry2 & entry3 \tabularnewline
entry4 & entry5 & entry6 \\
entry7 & entry8 & entry9 \newline
foobar
\end{longtable}
should produce the same output as this:
\usepackage{longtable}
% ... MAGIC ... %
\newlength\myRowSpacing
\myRowSpacing1ex
% ... MAGIC ... %
\begin{longtable}{ccc}
entry1 & entry2 & entry3 \tabularnewline[\myRowSpacing]
entry4 & entry5 & entry6 \\[\myRowSpacing]
entry7 & entry8 & entry9 \newline
foobar
\end{longtable}
Note how it should not apply to newlines (so multi-line cells have default linespacing).
What I tried:
\usepackage{longtable}
\usepackage{setspace}
\usepackage{etoolbox}
\AtBeginEnvironment{longtable}{\doublespacing}
% ... MAGIC ... %
\begin{longtable}{ccc}
entry1 & entry2 & entry3 \tabularnewline
entry4 & entry5 & entry6 \\
entry7 & entry8 & entry9 \newline
foobar
\end{longtable}
This produces something I like. Might be even better than the fixed spacing solution, if I figure out a nice factor... Except that it also applies to newlines - and I haven't succeeded in redefining newlines (yet).
So, what hack have I missed?
Regards, LDericher
\arraystretch: that's its only purpose so you can define it to stretch arrays, the only compatibility issue is that it applies to any nested tabular environments so if you have a longtable cell that contains a tabular and you don't want that to stretch then you will need...&\renewcommand\arraystretch{1}\begin{tabular}...to locally put it back inside the cell. – David Carlisle May 19 '14 at 20:16