The \tabulinesep
parameter with tabu
package provide good paddings for tables with variant heights. But when using it with diagbox
package, the paddings cause problem.
\documentclass{article}
\usepackage{amsmath,diagbox,tabu}
\begin{document}
tabulinesep
{\setlength{\tabulinesep}{3pt}
\begin{tabu}{|c|c|c|}
\hline
\diagbox{X}{Y} & Z & Z\\
\hline
$\dfrac12$ & $\dfrac34$ & $\dfrac56$ \\
\hline
$A$ & $B$ & $C$ \\
\hline
\end{tabu}}
%
extrarowsep
{\setlength{\extrarowsep}{3pt}
\begin{tabu}{|c|c|c|}
\hline
\diagbox{X}{Y} & Z & Z\\
\hline
$\dfrac12$ & $\dfrac34$ & $\dfrac56$ \\
\hline
$A$ & $B$ & $C$ \\
\hline
\end{tabu}}
\end{document}
How could I disable \tabulinesep
padding for only the first row of the table?
As you could see in the above example, \extrarowsep
doesn't give the desired paddings. Therefore I would like to stick to \tabulinesep
solution.
Best Answer
As an alternative, I propose
\addstackgap
of thestackengine
package, which only needs to be applied to the tallest cell in an oversized row. Here I use it in conjunction with\extrarowsep
, but depending on what look the OP seeks, that is not necessary.