[texhax] Aligning decimal point in table using "tabu"

Jerry jerry at seibercom.net
Sun Sep 20 20:01:04 CEST 2015


I am trying to create a table that has one column aligned by a decimal point. It is a currency column.

I used the example in the "tabu" help manual, but it fails to compile. This is the code:

\newcolumntype Z{X[c]{%
S[group-four-digits=true ,
round-mode=places,
round-precision=2,
round-integer-to-decimal=true,
per-mode=symbol ] } }
\tabucolumn Z
\begin {tabu} spread 8pt {|*2{Z|} c } \tabucline -
\rowfont \bfseries
{January} &{February} &. . . \\
\tabucline[1pt on2pt GreenYellow] -
12.324 & 745.32 &. . . \\
21.13 & 0 & . . . \\
213.3245 & 12.342 & . . . \\
2143.12 & 324.325 & . . . \\ \tabucline -
\end{tabu}

This is the error message:

line 111: Package array Error: Illegal pream-token (S[group-four-digits=true , round-m ] ): `c' used. \begin {tabu} spread 8pt {|*2{Z|} c }
line 111: Package array Error: Illegal pream-token (S[group-four-digits=true , round-m ] ): `c' used. \begin {tabu} spread 8pt {|*2{Z|} c }
: Over-specification in `h'-direction.
: Over-specification in `v'-direction.

I have all of the required packaged loaded (I hope).  Can anyone tell me what I am doing wrong?

Thanks!

-- 
Jerry




More information about the texhax mailing list