[Tex/LaTex] Conflict between tabu and tabularx, when using siunitx


I have many tables set with {tabularx} but for some of the it seems easier to use {tabu} which works. But if I use both packages and gave the last X column in {longtabu} an S and optional argument it crashes.

So I can “unload” tabularx to make it work which is no option or use another tabular preamble but this isn’t so nice …


\usepackage{tabularx}% comment this out to make it work

%\begin{longtabu} to \textwidth{llX[-0.5,l]{S}X[-0.5,l]{S}X[-0.5,l]{S}}
% works with this preamble even when tabularx is loaded:
\begin{longtabu} to \textwidth{llX[-0.5,l]{S}X[-0.5,l]{S}X{S}}
    2&  1400&   2,5 &   1,0 &2,3\\

I found How to use siunitx and tabularx together? but it doesn’t help.

Best Answer

tabularx is redefining \arraybackslash (and it even tells in the docu that this is a hack:

\arraybackslash \\ hack.

tabu doesn't like this definition. It expect \arraybackslash to have the meaning from array.sty. So now \\ gives errors. You can give \arraybackslash locally the standard definition back:

Related Question