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
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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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