11

Some time ago I wrote a document using tabularx and siunitx together. It compiled well in TL2016, but now on TL2017 (pretest) it gives me an error about

(c:/texlive/2017/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg)
! Missing } inserted.
<inserted text> 
                }
l.14        \end{tabularx}

? 

MWE (attention: you have to uncomment one line to see the error):

\documentclass{scrreprt}
\usepackage{array}
\usepackage{tabularx}
\usepackage[locale=DE]{siunitx}

\begin{document}
    \begin{table}[h]
        \caption{Vergleichende Darstellung der Pro-Kopf-Kosten in €}
% uncomment the following line to see the error
%       \renewcommand{\tabularxcolumn}[1]{S[table-column-width=#1,table-figures-decimal=2]}
        \begin{tabularx}{\linewidth}{@{}lXXXX@{}}
            \textbf{Position} & \multicolumn{2}{c}{\textbf{Criterion 1}} & \multicolumn{2}{c}{\textbf{Criterion 2}}\\
            1 & 220,00 & 0,00 & 0,00 & 220,00\\
            2 & 0,00 & 1,80 & 0,00 & 1,80
        \end{tabularx}
        \renewcommand{\tabularxcolumn}[1]{p{#1}}
    \end{table}
\end{document}

My question is especially what has changed and causes this problem and how to solve it for TL17.

Btw: I do know about How to use siunitx and tabularx together? and that solution does currently work, but my question is specifically about what causes this conflict now.

Update: File List

 *File List*
scrreprt.cls    2017/04/13 v3.23 KOMA-Script document class (report)
scrkbase.sty    2017/04/13 v3.23 KOMA-Script package (KOMA-Script-dependent basi
cs and keyval usage)
 scrbase.sty    2017/04/13 v3.23 KOMA-Script package (KOMA-Script-independent ba
sics and keyval usage)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
scrlfile.sty    2017/04/13 v3.23 KOMA-Script package (loading files)
tocbasic.sty    2017/04/13 v3.23 KOMA-Script package (handling toc-files)
scrsize11pt.clo    2017/04/13 v3.23 KOMA-Script font size class option (11pt)
typearea.sty    2017/04/13 v3.23 KOMA-Script package (type area)
   array.sty    2016/10/06 v2.4d Tabular extension package (FMi)
tabularx.sty    2016/02/03 v2.11 `tabularx' package (DPC)
 siunitx.sty    2017/03/23 v2.7f A comprehensive (SI) units package
   expl3.sty    2017/05/13 L3 programming layer (loader) 
expl3-code.tex    2017/05/13 L3 programming layer 
l3pdfmode.def    2017/03/18 v L3 Experimental driver: PDF mode
  xparse.sty    2017/05/13 L3 Experimental document command parser
 amstext.sty    2000/06/29 v2.01 AMS text
  amsgen.sty    1999/11/30 v2.0 generic functions
l3keys2e.sty    2017/05/13 LaTeX2e option processing using LaTeX3 keys
translator.sty    2010/06/12 ver 1.10
translator-language-mappings.tex
translator-basic-dictionary-English.dict    
siunitx-abbreviations.cfg    2017/03/23 v2.7f siunitx: Abbreviated units
 ***********
13

This is due to a change in expl3 interacting with some low-level code in siunitx: the latter is there due to a slight 'gap' in the coverage of useful functions by expl3. For the present, adding

\ExplSyntaxOn
\cs_set_protected:Npn \hbox_set:Nw  #1
  { \tex_setbox:D #1 \tex_hbox:D \c_group_begin_token }
\cs_set_eq:NN \hbox_set_end: \c_group_end_token
\ExplSyntaxOff

will fix the issue. I will update one or both of expl3 and siunitx today to address this long-term. (The above is a sticking-plaster solution for the immediate issue, but not the best overall solution in the long run.)

  • 1
    Thanks, it does work, but I'll wait for the update for my main document ;) – TeXnician May 19 '17 at 8:08

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.