How can I add a bit of vertical space (without interrupting the vertical
rules) at the places marked '%% need extra vspace here'?
\documentclass{article}
\usepackage{bm} % for bold math vectors/matrices
\newcommand*{\vec}[1]{\ensuremath{\bm{#1}}}
\newcommand*{\mat}[1]{\ensuremath{\bm{#1}}}
\newcommand{\trans}{\ensuremath{^\mathsf{T}}}
\newcommand{\code}[1]{{\texttt{#1}}}
\begin{document}
\begin{table}[htb]
\renewcommand{\arraystretch}{1.5}
\renewcommand{\tabcolsep}{0.5cm}
% \vspace{6pt}
\label{tab:BWtab}
\begin{tabular}{|l|l|l|l|l|}
\hline
% after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
& \multicolumn{4}{c|}{Between-S effect tested} \\ \cline{2-5}
$\mat{M}$ for Within-S effects & Intercept & $\mat{L} = \mat{L}_A$ &
$\mat{L} = \mat{L}_B$ & $\mat{L} = \mat{L}_{AB}$ \\[1ex] \hline
%% need extra vspace here
$\mat{M} = \mat{M}_1 = \left(
\begin{array}{rrr}
1 & 1 & 1 \\
\end{array}
\right)\trans
$ & $\vec{\mu}_{..}$ & \code{A} & \code{B} & \code{A:B} \\[.5ex]
\hline
%% need extra vspace here
$\mat{M} = \mat{M}_C = \left(
\begin{array}{rrr}
1 & -1 & 0 \\
0 & 1 & -1 \\
\end{array}
\right)\trans
$ & \code{C} & \code{A:C} & \code{B:C} & \code{A:B:C} \\
\hline
\end{tabular}
\caption{Three-way design: Tests for between- (A, B) and within-S (C)
effects
are constructed using
various \mat{L} and \mat{M} matrices. Table entries give the term
actually tested
via the general linear test in \eqref{eq:mglt-rep}.}
\end{table}
\end{document}
once i had got your document to compile (\vec is redefined, \eqref
defined but not used) i used
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=struttab
to investigate what's the simplest solution.
without a doubt, simplest is just to add package tabls (which might be
troublesome because it's said to be "slow", but unless you're generating
thousands of these tables it probably not much of a problem.
tabls just "gets on and does the job". i expected booktabs to do the
same thing (neater and more efficiently), but it doesn't.
some of the other recommendations in the faq answer may be useful too,
but with a solution (of sorts) i've not gone any further.
--
Robin Fairbairns, Cambridge
> without a doubt, simplest is just to add package tabls (which might be
> troublesome because it's said to be "slow", but unless you're generating
> thousands of these tables it probably not much of a problem.
>
> tabls just "gets on and does the job". i expected booktabs to do the
> same thing (neater and more efficiently), but it doesn't.
I really must revisit tabls. Speed is not a problem now (it wasn't
even a *problem* back then, but it was detectable). The problem is
it is based on the plain LaTeX internals, not the array package,
which is used in almost all documents.
Booktabs is fine if you have no vertical rules (it uses real \lineskip,
which tab*LS* simulates).
--
Donald Arseneau as...@triumf.ca
One way to solve the problem is to use this hack involving the \rule
command:
https://www.msu.edu/~harris41/latex_tablespacing.html
/August
i thought of suggesting custom struts, too, but since that's in essence
what tabls is doing, i decided against.
--
Robin Fairbairns, Cambridge
> i thought of suggesting custom struts, too, but since that's in essence
> what tabls is doing, i decided against.
I even use ad-hoc struts myself, which I usually write as
\raise 3pt\hbox{\strut} (or \lower)
but could use a \rule command with or without \raisebox.
--
Donald Arseneau as...@triumf.ca
One way to solve the problem is to use this hack involving the \rule
command:
https://www.msu.edu/~harris41/latex_tablespacing.html
/August