8

After recent update of longtable package (2021.05.07) I am getting the error:

Dimension too large. \end{longtabu}

Log:

! Dimension too large.
<to be read again> 
=
l.10 \end{longtabu}

I can't work with sizes bigger than about 19 feet. Continue and I'll use the largest value I can.

MWE:

\documentclass{article}
\usepackage{longtable}%
\usepackage{tabu}%
\begin{document}
\begin{longtabu}  {llX}
a & b & c\\
\end{longtabu}
\end{document}
andc
  • 941
  • 6
  • 15
  • 1
    Coincidentally, I had an issue with tabu package today. Ulrike said it's broken. ref – Book Of Flames Jun 10 '21 at 14:53
  • 1
    The problem is that longtable is actively maintained to fix issues; on the other hand, tabu has been buggy forever and unmaintained for several years. – egreg Jun 10 '21 at 14:58
  • tabu is frozen from 2019-01-11, and my error appeared recently, that's why I think there is also some problem with maintained lontable package. – andc Jun 10 '21 at 14:59
  • Shall I wait for fix on longtable side? Or switch to some other package? – andc Jun 10 '21 at 15:00
  • The problem is not longtable but tabu. And there is no maintainer in view to take it over and correct its incompabilities. So currently it is recommended not to use it. – Ulrike Fischer Jun 10 '21 at 15:03
  • Still dont understand why my code worked just fine with previous longtable versions (up to 4.16). This particular error appeared only after recent update of tools (parent of longtable). Perhaps there is also a lot of problems with tabu but why my code worked fine one mouth ago? tabu has not changed for 2 years. – andc Jun 10 '21 at 15:27
  • 4
    you probably also updated latex. tabu does lots of low-level tricks and every change in latex can make it fail in more places. Sorry but since years the advice is not to use this package, see the readme here https://github.com/tabu-issues-for-future-maintainer/tabu. – Ulrike Fischer Jun 10 '21 at 15:38
  • @andc it worked with 4.14? that's sort of interesting 4.14 was a slightly large update (given that there hadn't been an update for 20 years, any update is "large") but 4.15 was small and 4.16 was tiny. – David Carlisle Jun 10 '21 at 16:23
  • 1
    I just tried 4.14,4.15 and 4.16 and tabu fails with all of them which is more understandable 4.14 had some re-organisation to cope with floats appearing on the same page (when older versions would run off the bottom of the page in some cases) – David Carlisle Jun 10 '21 at 16:34
  • I've rolled back parent container package tool to previous version (56514) where longtable had version 4.12 and it works. tool container was updated 2021-06-01 and from that date my code doesn't work. I think I must switch to xltabular. – andc Jun 10 '21 at 16:45
  • 1
    Ulrike found that tabu was relying on me using box1 and failds now I allocate a longtable-specific box (to avoid clashes with other packages....) https://github.com/tabu-issues-for-future-maintainer/tabu/issues/26 – David Carlisle Jun 10 '21 at 19:58

2 Answers2

13

tabu is unmaintained but as a short term fix you can force an old version of longtable to load

\documentclass{article}
\usepackage{longtable}[=v4.13]%
\usepackage{tabu}%
\begin{document}

\begin{longtabu} {llX} a & b & c\ \end{longtabu} \end{document}

The changes in longtable have been very minor and only addressing features that fairly obviously needed addressing, but apparently tabu was relying on an internal definition somewhere.


It turns out that specifically tabu is relying on longtable using the \box1 scratch register and fails now longtable allocates a box for its internal use (a change made to avoid conflicts with other packages, you can't win...) there is a patch at the tabu github

https://github.com/tabu-issues-for-future-maintainer/tabu/issues/26

David Carlisle
  • 757,742
4

The new LaTeX3 package tabularray is an alternative to the outdated tabu package. You can use tblr and longtblr environments with it.

\documentclass{article}
\usepackage{tabularray}
\begin{document}
\begin{longtblr}[
  caption = {Table Caption},
]{llX[2,c]X[3,r]}
\hline
  a & b & c & d \\
\hline
\end{longtblr}
\end{document}

enter image description here

L.J.R.
  • 10,932
  • Unfortunately, tabularray has substantially worse performance than tabu. – bb94 Mar 12 '23 at 20:37
  • I was in the same case, and I've discover this package, which brings together a lot of features seamlessly : X columns, longtable, border and cell colors, ... A must ! – 3isenHeim May 26 '23 at 10:34