I would like to add some space between the rows in a table, specifically to prevent the brackets in my matrices to touch, cf. this MWE:
\documentclass{article}
\newcommand*{\mymatrix}[1]{
\ensuremath{%
\left[\begin{tabular}{@{}l@{}}#1\end{tabular}\right]%
}%
}
\begin{document}
\begin{tabular}{*3{l}}
foo & bar & baz\
foo & \mymatrix{top\bottom} & baz\
foo & \mymatrix{top\bottom} & baz\
foo & bar & baz\
\end{tabular}
\end{document}
There are many questions on TeX.SE asking how to add space between rows in a table, and it seems to me that the answers always suggest increasing the value of \arraystretch, see e.g. this question among many.
But as far as I can tell, this doesn't actually add space between rows, it simply stretches the rows vertically. If something fills the vertical space of the rows, as my matrices do, the content of these rows still touches, cf. below:
\documentclass{article}
\newcommand*{\mymatrix}[1]{
\ensuremath{%
\left[\begin{tabular}{@{}l@{}}#1\end{tabular}\right]%
}%
}
\renewcommand{\arraystretch}{2}
\begin{document}
\begin{tabular}{*3{l}}
foo & bar & baz\
foo & \mymatrix{top\bottom} & baz\
foo & \mymatrix{top\bottom} & baz\
foo & bar & baz\
\end{tabular}
\end{document}
So my question is, is there a way to truly add space between rows in a table (other than inserting empty rows, which adds too much space)?







\addlinespaceof the booktabs package? – Mico Aug 21 '20 at 15:11\\takes an optional argument which is an amount of space to insert at the row separation. – Don Hosek Aug 21 '20 at 15:14mymatrixenvironment in other contexts, you could modify the definition to add additional vertical spacing. – Don Hosek Aug 21 '20 at 15:16mymatrixis mostly used outside of tables, so I'd rather leave that alone. – Sverre Aug 21 '20 at 15:18