3

After last update of TeX Live packages this code won't compile:

\documentclass{article}

\usepackage{longtable,tabu}
\usepackage{color}

\begin{document}

\begin{longtabu} to \linewidth {llX}
    a & b & c\\
\end{longtabu}

\end{document}

I got an error:

Missing } inserted. \end{longtabu}

if I comment out \usepackage{color} everything works. Another strange thing - if I change last column type from X to say l - it also works (even with color package added).

  • I can reproduce the issue and guess it has to do with recent changes to array.sty, I suspect this is related to tex.stackexchange.com/q/466147/35864 – moewe Jan 7 at 12:12
  • It seems so. But workaround proposed here (tex.stackexchange.com/a/466261/87293) doesn't work in my situation. – andc Jan 7 at 12:16
  • Also, it seems my issue is result of 2019-01-05 la­tex-tools update where issue mentioned by you was fixed. – andc Jan 7 at 12:34
  • The source of the problem is a small change in longtable. – Ulrike Fischer Jan 7 at 12:38
  • The fix appears to be incomplete — see github.com/tabu-fixed/tabu/issues/1 — but I’ve just submitted a patch that may help us further along, hopefully not breaking anything in the progress ☺ – mirabilos Feb 24 at 16:29
6

UPDATE 2019-01-14

An equivalent patch has been applied in tabu 2.9 which has been submitted to ctan.


The following seems to work (I also added the other patch):

\documentclass{article}

\usepackage{longtable}
\usepackage{tabu}
\usepackage{color}
\usepackage{etoolbox}

\makeatletter
\patchcmd\tabu@startpboxmeasure
  {\aftergroup\tabu@endpboxmeasure}
  {\aftergroup\tabu@endpboxmeasure
   \color@begingroup
  }{\typeout{tabu patched}}{\typeout{tabu patch failed!}}

\patchcmd\tabu@LT@startpbox
 {\bgroup}{\bgroup\color@begingroup}
 {\typeout{tabu patched}}{\typeout{tabu patch failed!}}  
\makeatletter

\begin{document}

\begin{longtabu} to \linewidth {llX}
    a & b & c\\
\end{longtabu}

\end{document}
  • Is there a way to run this example with an older version of LaTeX as well (e.g. This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6840 64-bit))? At the moment it crashes with the mentioned version with a "! Extra }, or forgotten \endgroup." – albert Jan 14 at 12:26
  • @albert did you ever figure out a way to add this patch only when needed? – Andreas Grapentin Mar 29 at 14:30
  • @AndreasGrapentin No I didn't try as I want to try to stick to official distributions regarding LaTeX. I think this problem should be tackled on github in github.com/tabu-fixed/tabu and afterwards in CTAN distributions. – albert Mar 29 at 14:49

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.