# [texhax] nested tabu with colors

Arno Trautmann Arno.Trautmann at gmx.de
Wed Jun 27 09:19:13 CEST 2012

Hi all,

I want to use a nested tabu environment to typeset a table, but also
want to use colors. That works fine as long as I don't nest the tabus, i.e.:

\documentclass{minimal}
\usepackage{tabu}
\usepackage[table]{xcolor}
\begin{document}
\taburowcolors 2{green!25 .. yellow!50}
\begin{tabu}{*2{X[c]}}
a & b \\
c & d \\
a & b \\
\end{tabu}
\end{document}

As soon as I try to nest these in the following way:

\documentclass{minimal}
\usepackage{tabu}
%\usepackage[table]{xcolor}
\begin{document}
%\taburowcolors 2{green!25 .. yellow!50}
\begin{tabu}{*2{X[c]}}
a & b \\
c & d \\
a & \begin{tabu}{l}
abc
\end{tabu} \\
\end{tabu}
\end{document}

I get an error telling me:

./test.tex:12: Missing number, treated as zero.
\tabu at 1.H0
l.12 \end{tabu}

?

The error even occurs when I comment out the \taburowcolors. It's just
loading xcolor with [table] and nesting tabus. Is this a bug or am I
doing something totally wrong?

cheers
Arno