3

After MIKTEX package updates vertical m-column alignment in tabu does not work anymore. See MWE below

\documentclass{article}
\usepackage{tabu}

\begin{document}

\tabulinesep=3pt


Result using tabu:

\begin{tabu} to \linewidth {|X[p]| X[m]| X[b]|}
    \hline
    \centering header p &
    \centering header m &   
    \centering header b \tabularnewline
    \hline
    text which is considerably longer than the width of the column  & 
    text which is considerably longer than the width of the column  & 
    text which is considerably longer than the width of the column 
    \tabularnewline
    \hline
\end{tabu}

\vspace*{1cm}

Result using tabular:

\begin{tabular}{|p{0.3\linewidth}|m{0.3\linewidth}|b{0.3\linewidth}|}
    \hline
    \centering header p &
    \centering header m &   
    \centering header b \tabularnewline
    \hline
    text which is considerably longer than the width of the column  & 
    text which is considerably longer than the width of the column  & 
    text which is considerably longer than the width of the column 
    \tabularnewline
    \hline
\end{tabular}


\end{document}

The results is: MWE mit tabu and tabular

Both tables should be equal but m-column in tabu is broken.Does anyone know which package is responsible for that? Here is the list of packages that were updated: enter image description here

  • Welcome to TeX.SX! Just to mention it: TL2018 (fully updated) is also affected. – TeXnician May 10 '18 at 13:45
  • In my case I never use the tabu package alone, since it needs the longtable, tabularx, array and multirrow packages, if I compile your code with my normal configuration I have no problems, I get the same as with the tabular environment, you should know that tabu is not a self-contained package, it is a set of macros that other table libraries use to create beautiful tables .... – J Leon V. May 10 '18 at 15:16
  • @JLeonV. do you have the 2018-04-01 latex release? – David Carlisle May 10 '18 at 16:35
  • @DavidCarlisle, it's an honor to answer you... Yes, LaTeX2e <2018-04-01> patch level 3, And I compile with pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6670 64-bit) – J Leon V. May 10 '18 at 20:11
  • @JLeonV. it shouldn't work I think, can you check you have array.sty 2018/04/30 v2.4h – David Carlisle May 10 '18 at 20:24
6

UPDATE 2019-01-14

A workaround for this issuse has been included in tabu 2.9 which has been submitted to ctan.


tabu probably needs an update to match the latest array, but you can force the use of the old array by using the new [=... optional argument to \usepackage.

enter image description here

\documentclass{article}
\usepackage{array}[=2016-10-06]
\usepackage{tabu}

\begin{document}

\tabulinesep=3pt


Result using tabu:

\begin{tabu} to \linewidth {|X[p]| X[m]| X[b]|}
    \hline
    \centering header p &
    \centering header m &   
    \centering header b \tabularnewline
    \hline
    text which is considerably longer than the width of the column  & 
    text which is considerably longer than the width of the column  & 
    text which is considerably longer than the width of the column 
    \tabularnewline
    \hline
\end{tabu}

\vspace*{1cm}

Result using tabular:

\begin{tabular}{|p{0.3\linewidth}|m{0.3\linewidth}|b{0.3\linewidth}|}
    \hline
    \centering header p &
    \centering header m &   
    \centering header b \tabularnewline
    \hline
    text which is considerably longer than the width of the column  & 
    text which is considerably longer than the width of the column  & 
    text which is considerably longer than the width of the column 
    \tabularnewline
    \hline
\end{tabular}


\end{document}
  • I have no idea what tabu should do to correct the problem, but the cause is that array now uses \vbox instead of \vcenter for the m-column and as tabu tests for \currentgrouptype it doesn't get 12 but 4 and so takes the wrong path. – Ulrike Fischer May 10 '18 at 14:44
  • Thanks for the quick help. I didn't expect such a fast answer :). I found out that the problem persists if the \usepackage{siunitx} is loaded before. \usepackage{array}[=2016-10-06] should be loaded first to avoid any problems. Thank you! – Micha May 10 '18 at 20:18
  • 1
    @Micha I have mailed the tabu author pointing out this incompatibility, so hopefully he'll update to match the latest array. – David Carlisle May 11 '18 at 22:14
  • @DavidCarlisle Don't hold your breath. – cfr Jun 14 '18 at 0:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.