in my masterthesis I want to create regression tables the numbers in the table are aligned by the decimal point.
Here is a MWE to get an impression what I'm talking about:
\documentclass[10pt,a4paper]{article}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{siunitx}
\begin{document}
\begin{table}
\caption{MWE without multicolumn elements.}
\begin{tabularx}{\textwidth}{XSSSS} % S: align by decimal point (part of the siunitx package)
\toprule
1&2&3&4&5\\
\midrule
1 & 94.90 & 5.10 & 0.00 & 0.00 \\
2 & 4.08 & 88.78 & 6.80 & 0.34 \\
3 & 0.00 & 4.08 & 91.84 & 4.08 \\
4 & 1.02 & 0.51 & 5.61 & 92.86 \\
\bottomrule
\end{tabularx}
Note: bla bla bla bla.
\end{table}
\end{document}
The code above leads to following results:

I am quite satisfied with this result, but if I add \mulitcolumn areas like in the following MWE the compilation process doesn't work:
\documentclass[10pt,a4paper]{article}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{siunitx}
\author{Name of the author}
\begin{document}
\begin{table}
\caption{MWE without multicolumn elements.}
\begin{tabularx}{\textwidth}{XSSSS} % S: align by decimal point (part of the siunitx package)
\toprule
&\multicolumn{2}{c}{Subset 1}& \multicolumn{2}{c}{Subset 2}\\
\cmidrule(lr){2-3} \cmidrule(lr){4-5}
& 1\_PR\_bin & 2\_PR\_log & 3\_RE\_bin & 4\_RE\_log \\
\midrule
1 & 94.90 & 5.10 & 0.00 & 0.00 \\
2 & 4.08 & 88.78 & 6.80 & 0.34 \\
3 & 0.00 & 4.08 & 91.84 & 4.08 \\
4 & 1.02 & 0.51 & 5.61 & 92.86 \\
\bottomrule
\end{tabularx}
Note: bla bla bla bla.
\end{table}
\end{document}
Who can help me to fix this issue? Thank you very much in advance for your help!!
tabularxandXin the first column. I wrotetabularxand I'd never use it in such a way, it just looks horrible with the first column disconnected from the table. Why not just usetabularand anlcolumn for the first column? – David Carlisle Oct 28 '14 at 15:16Xin the first column was just in the MWE. I never intended to use it in that way. – Magnus Metz Oct 28 '14 at 15:32