The minimal example below gives me a strange offset in numbers with exponential numbers. I think tabu and siunitx are getting in each others way. Is anyone aware of a workaround?




\newcolumntype Z{X[c,m]{%
tight-spacing = true,
\tabucolumn Z
\begin{tabu} to \linewidth {X[l,m,1.2]ZZZZZ}
Water vapour* & 18.01534 & -2.418379e+8 & 1.886964e+5 &
2.605& 572.4\\


enter image description here

  • 1
    The author of tabu is very active on comp.text.tex, but not here. You might want to (also) ask this question there. Commented May 9, 2011 at 10:44

1 Answer 1


The question was answered by the developer on comp.text.tex and I thought I share it here to answer the question:

Well. In next version, thank to Bruno Le Floch rewritting process, there is no \tabucolumn command:

\newcolumntype Z{ XS[m,
                          round-precision=2] }

X[options]{S[option]} is implemented as XS[ X option , S option] but both still work.

\tabucolumn indeed has no signifiance: I put it there due to some potential parsing problems of the tabu preamble. Problems that no more exist thank to B Le Floch.

XS ( or X[..]{S[...]} ) is always centered: there is no point to set the horizontal alignment for S and s columns: the alignment can't be chosen.

\begin{tabu} to \linewidth {X[l,m,1.2]ZZZZZ}

Avoid X[l,m,1.2] -> for XS columns the comma is "reserved" to separate the options of X with the options for S. Thus it's good practice not to use any delimiter for X options : X [1.2 lm] (and more readable imho)

 Water vapour*&  18.01534&  -2.418379e+8&  1.886964e+5&
 2.605&  572.4\\

Now the problem of the vertical alignment: ;-)

The problem is not tabu but siunitx (sorry ;-( ): siunitx leaves too much fixed space before the numbers, because the S column mechanism proceeds with "fixed width". To be able to adjust the spacing, the S column should read the whole tabular and then choose the spacing depending on the "natural length" of each typeset number in each column.

This is what is done inside tabu X, but tabu cannot adjust the spacing made by siunitx: the spaces are inside a box, and tabu can't destroy the box (and thereafter re-align the numbers ! )

If you try with:

 \newcolumntype Z{X[-1
 m]{S[tight-spacing =

 \begin{tabu} to \linewidth {X[lm] |
 *5{Z|}} \hline Water vapour* & 18.01534 & -2.418379e+8 & 1.886964e+5 &
 2.605& 572.4\\ \hline \end{tabu} 

There is no more problems of alignment. But the columns width are not the same. You can understand the problem with :

 \newcolumntype Z{S[tight-spacing =

\begin{tabu} to \linewidth {X[-1 lm] |
*5{Z|}} \hline Water \par vapour* & 18.01534 & -2.418379e+8 & 1.886964e+5 &
2.605& 572.4\\ \hline \end{tabu}

This shows that siunitx needs more space than the X coefs allow. Hence the line break inside the X[m] ( ie m ) column.

So: change your margin, or artificially raise the tabu width:

 \newcolumntype Z{X[m]{S[tight-spacing
 = true,round-mode=places,
 \hskip-10mm \begin{tabu} to 500pt
 {X[-1 lm] | *5{Z|}} \hline Water \par
 vapour* & 18.01534 & -2.418379e+8 &
 1.886964e+5 &
 2.605& 572.4\\ \hline \end{tabu}

Here there is no more problem. (for future version 2.9 at least)

  • This answer confuses me.
    – einpoklum
    Commented Jul 23, 2018 at 21:53
  • @einpoklum If you could explain what confuses you, someone might be able to help
    – Martin H
    Commented Sep 27, 2018 at 9:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .