# Re: #9568: Multicolumn, fixed width, and decimal-separator-alignment does not compile

Am 16.10.2016 um 14:18 schrieb LyX Ticket Tracker:

#9568: Multicolumn, fixed width, and decimal-separator-alignment does not
compile




 If you show us how to do it in LaTeX, we can implement it in LyX.



The attached Latex file uses the "siunitx" package (which I've never used before) to achieve flexibility with respect to the within-cell-alignment of the decimal-aligned multicolumns.
(If the attachment doesn't make it through this channel please tell me.)


In the attached version you find the line "table-number-alignment = center," -- you can substitute "left" or "right" there, and it yields the intended effect for me, namely the whole block of what's in the three multicolumn rows wanders to the left or to the right, while staying aligned at the decimal dot.


BTW, the "{c}" part after the three "\multicolumn{2}" thingies is mysterious to me, changing that to "{l}" or "{r}" didn't seem to have any effect.

HTH,
Sven

\documentclass{article}

\usepackage{siunitx}
\usepackage{booktabs}

\begin{document}

\begin{table}
\caption{Controlling complex alignment with the {tablenum}
macro.}

\label{tab:tablenum}

\sisetup{
table-number-alignment = center,
table-figures-integer = 4,
table-figures-decimal = 4
}

\centering
\begin{tabular}{lr}
\toprule
\midrule
\end{document}