I'm using the tabular features of siunitx (for what it is worth: v1.3 since I'm on TexLive 2009) to align numbers in tables, eg.
\begin{tabular}{ p{1.5cm} S S S }
bla & 1.23 & 4.5 & 67.89 \tabularnewline
\end{tabular}
and that works perfectly fine.
Now I would like to have this table span a specific width, or rather to have several tables to have the same width. For this I would normally use tabularx
\begin{tabularx}{\textwidth}{ p{1.5cm} X X X }
bla & 1.23 & 4.5 & 67.89 \tabularnewline
\end{tabular}
Now, is there a way to combine the two? To have the number formatting and alignment features of siunitx inside an automatically resizing table?
Xcolumn intabularxis then converted top{<width>}where width is automatically calculated. You can change this by redefining the\tabularxcolumnmacro like described in the package manual:\renewcommand{\tabularxcolumn}[1]{...}. I'm sure Joseph Wright (author ofsiunitxand moderator here) can tell you what to put for.... I'm couldn't find it out for myself yet. (My LaTeX3-fu is still very weak) – Martin Scharrer♦ Mar 4 '11 at 14:29siunitx, which I plan to do for version 2.2 (aiming to work on it next month). – Joseph Wright♦ Mar 4 '11 at 14:47siunitxinternals - they are not documented and so are liable to arbitrary changes! Your solution is quite nice, with the only thing I'd say being to use\ExplSyntax(On|Off)rather than the 'raw'\catcodeapproach you've taken. Insiunitx, I can't just use a 'p' column as I don't know what options are set when the column is defined - I have to wait until I'm inside the cell! – Joseph Wright♦ Mar 13 '11 at 12:18