I'm looking for a macro to span all cells in a tabu environment to get category headers in tables.
This example does what I need for two columns.
\begin{tabu} {XX}
abc & def \\
\multicolumn{2}{c}{category header} \\
ghi & jkl \\
\end{tabu}
What I want is a macro without the need to specify the number of columns. The category header should always span over all columns of the tabu environment.
I tried to access the tabu@nbcols constant but I've got no clue how to do that. These two don't work:
\multicolumn{\tabu@nbcols}{c}{header}
\multicolumn{\the\tabu@nbcols}{c}{header}
What I want could look like:
\begin{tabu} {XX}
abc & def \\
\mycatheader{category header} \\
ghi & jkl \\
\end{tabu}
\noalign{\textbf{Header text}}? – Thruston Dec 9 '12 at 19:33