# tabu: Error since update

Since the last update of tabu.sty I get the following error:

! Improper \prevdepth. \tabu@verticalspacing ... tempdimc \t


Here is a MWE

\documentclass[a4paper,12pt]{report}
\usepackage{tabu}
\usepackage{amsmath}
\usepackage{xcolor}
\newcolumntype{L}{>{\begin{varwidth}{0.91\linewidth}}l<{\end{varwidth}}}

\begin{document}
\begin{tabu}{Lcc}
$\begin{pmatrix} 1 \\2\\3 \end{pmatrix}$& 2& 3\\
\end{tabu}

\end{document}


The error occurs, when including pmatrix (or array) in a tabu-environment with a predefined column (using varwidth) AND strangely when including any other of a list of packages (like: color.sty, xcolor.sty, pstricks-add.sty, colortbl.sty, ...) Everything worked fine before the update!

Does anyone know, how to fix this?

Here is the first line of the log file:

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6930 64-bit) (preloaded format=latex 2019.1.13) 20 JAN 2019 12:55 entering extended mode

• Might be related to tex.stackexchange.com/questions/470107/… , probably some other / more problems here. – albert Jan 20 '19 at 11:49
• It's best to raise at github.com/tabu-fixed/tabu/issues but anyway clear test file, and I can confirm it fails, I'll see what I can do... (tabu internals are not well documented and the original author is out of contact) – David Carlisle Jan 20 '19 at 11:53
• This should be fixed in tabu 2.10 – David Carlisle Jan 20 '19 at 13:34
• With TeX Live 2019, the latest update for tabu is only 2.9. Do I have to wait until TeX Live 2020 to get tabu 2.10, or is there another way? – splicer Jan 20 at 0:15

I think this is the correct fix, if it survives some more testing I'll get tabu updated on ctan.

\documentclass[a4paper,12pt]{report}
\usepackage{tabu}
\usepackage{amsmath}
\usepackage{xcolor}
\newcolumntype{L}{>{\begin{varwidth}{0.91\linewidth}}l<{\end{varwidth}}}

\makeatletter
\def\tabu@verticalmeasure{\everypar{}%
\unless\ifnum\currentgrouptype=14 \let\tabu@currentgrouptype\currentgrouptype\fi
\ifnum \tabu@currentgrouptype>12         % 14=semi-simple, 15=math shift group
\setbox\tabu@box =\hbox\bgroup
\let\tabu@verticalspacing \tabu@verticalsp@lcr
\d@llarbegin                % after \hbox ...
\else
\edef\tabu@temp{\ifnum\tabu@currentgrouptype=5\vtop
\else\ifnum\tabu@currentgrouptype=12\vcenter
\else\vbox\fi\fi}%
\setbox\tabu@box \hbox\bgroup$\tabu@temp \bgroup \let\tabu@verticalspacing \tabu@verticalsp@pmb \fi } \makeatother \begin{document} \begin{tabu}{Lcc}$\begin{pmatrix}
1 \\2\\3
\end{pmatrix}$& 2& 3\\ \end{tabu} \end{document}  • As far as I can test it right now, it works. Although the$ in the line \setbox\tabu@box \hbox\bgroup\$\tabu@temp \bgroup confuses my editor, because it sees it as a beginning of a formular. – chris Jan 20 '19 at 13:43
• @chris thanks I plan to push 2.10 to ctan now, so it should appear in texlive/miktex later in the week. – David Carlisle Jan 20 '19 at 13:50
• Thanks! However, I just found out, the above mentioned problem also occurs (exactly in the same way), when including a table (e.g tabular) in the tabu-environment and is not solved by this solution. (It also worked before the last update!) – chris Jan 20 '19 at 14:06
• @DavidCarlisle did you ever get a chance to upload 2.10 (latest version on CTAN appears to be 2.9 still), or did it not fix the issue? – Peet Whittaker Sep 26 '19 at 9:39
• @PeetWhittaker No people raised some issues on 2.10 as it is there and so it wasn't clear that that was the right change so it stalled and basically we are just using the github so people can record issues but maintenance will need to wait for a volunteer to maintain it, we simply don't have the bandwidth to pick up this package. – David Carlisle Sep 26 '19 at 9:52