# Using longtabu with multicolumn produces errors sometimes

I have a document which uses the longtable package as well as \multicolumn to have certain cells which span multiple columns. This seems to work just fine:

\documentclass[10pt]{report}

\usepackage{longtable}
\usepackage{tabu}
\usepackage[letterpaper, top=0.5in, right=0.75in, bottom=0.5in, left=0.75in]{geometry}

\begin{document}

\begin{longtabu}{ X[2,l] X[3,l] X[1,l] X[5,l] }
\textbf{Date} & \textbf{Employee} & \textbf{Hours} & \textbf{Notes} \\

\end{longtabu}

\end{document}


However, I then tried to implement a different table, and this time I get errors from pdflatex:

\documentclass[10pt]{report}

\usepackage{longtable}
\usepackage{tabu}
\usepackage[letterpaper, top=0.5in, right=0.75in, bottom=0.5in, left=0.75in]{geometry}

\begin{document}

\begin{longtabu}{ X[4,l] X[2,r] X[1,c] X[2,r] X[1,c] }
\textbf{Description} &
\multicolumn{2}{c}{\textbf{Current}} & \\
\multicolumn{2}{c}{\textbf{Cumulative}} \\
\hline

\end{longtabu}

\end{document}


I've tweaked to two tables to try and determine the source of the error, and it seems to come from the number of columns being spanned. For example, in the working table, if I change \multicolumn{3}{l}{ ... } to \multicolumn{2}{l}{ ... } & Foo, then I get the same error. It is not at all clear to me why this is the case.

Here is the relevant output from pdflatex:

! Dimension too large.
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
\LT@max@sel #1#2->{\ifdim #2=\wd \tw@
#1\else \number \c@LT@chunks \fi }{\th...
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
\LT@max@sel #1#2->{\ifdim #2=\wd \tw@
#1\else \number \c@LT@chunks \fi }{\th...
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
\LT@max@sel #1#2->{\ifdim #2=\wd \tw@
#1\else \number \c@LT@chunks \fi }{\th...
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
\relax
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
\relax
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
\relax
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
=
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
=
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
=
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
\LT@max@sel #1#2->{\ifdim #2=\wd \tw@
#1\else \number \c@LT@chunks \fi }{\th...
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
\LT@max@sel #1#2->{\ifdim #2=\wd \tw@
#1\else \number \c@LT@chunks \fi }{\th...
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
\LT@max@sel #1#2->{\ifdim #2=\wd \tw@
#1\else \number \c@LT@chunks \fi }{\th...
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
\relax
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
\relax
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
\relax
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
=
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
=
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
! Dimension too large.
=
l.23 \end{longtabu}
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.
Package longtable Warning: Column widths have changed
(longtable) in table 1 on input line 23.
Package longtable Warning: Table widths have changed. Rerun LaTeX.


It's best (in any alignment) not to have columns that are always spanned.

\documentclass[10pt]{report}

\usepackage{longtable}
\usepackage{tabu}
\usepackage[letterpaper, top=0.5in, right=0.75in, bottom=0.5in, left=0.75in]{geometry}

\begin{document}

\begin{longtabu}{ X[4,l] X[2,r] X[1,c] X[2,r] X[1,c] }
\textbf{Description} &
\multicolumn{2}{c}{\textbf{Current}} & \\
\multicolumn{2}{c}{\textbf{Cumulative}} \\
\hline
a&b&c&d&e

• Thanks! This does indeed seem to be the issue. This may seem like an odd request, but is there some way to add a row which allows this table to be rendered even if only the spanned header columns are displayed? It seems like \hphantom may work, but I can't seem to get it to not add extra height for that "phantom row". – CmdrMoozy Jul 7 '14 at 16:32
• longtable has a \kill row which would probably work, not sure if tabu kept that (personally I'd use longtable:-) – David Carlisle Jul 7 '14 at 16:34
• Very cool. What is this notation/syntax \begin{longtabu}{ X[4,l] X[2,r] X[1,c] X[2,r] X[1,c] }? – Sal Jr Dec 18 '18 at 23:41