I have a table which I need to automatically format all numbers to two decimal places. Is this possible? Or do I need to format the entire document?
EDIT:
I have applied the code suggested in an answer but unfortunately it doesn't seem to work for my specific table! Anyone have any ideas on how to adapt it accordingly?
\documentclass{article} \usepackage{siunitx} \begin{document}
\sisetup{
table-number-alignment = center,
table-figures-integer = 1,
table-figures-decimal = 2
}
\begin{table}[thb]
\caption{\label{labelname}Table Caption}
\scriptsize
{\centering \begin{tabular
{lr@{\hspace{0cm}}c@{\hspace{0cm}}rr@{\hspace{0cm}}c@{\hspace{0cm}}r@{\hspace{0.1cm}}cr@{\
space{0cm}}c@{\hspace{0cm}}r@{\hspace{0.1cm}}cr@{\hspace{0cm}}c@{\hspace{0cm}}r@{\hspace{0
1cm}}cr@{\hspace{0cm}}c@{\hspace{0cm}}r@{\hspace{0.1cm}}cr@{\hspace{0cm}}c@{\hspace{0cm}}r
{\hspace{0.1cm}}cr@{\hspace{0cm}}c@{\hspace{0cm}}r@{\hspace{0.1cm}}cr@{\hspace{0cm}}c@{\hs
ace{0cm}}r@{\hspace{0.1cm}}c}
\\
\hline
Dataset & \multicolumn{3}{c}{ConjunctiveRule }& \multicolumn{4}{c}{DecisionTable } &
\multicolumn{4}{c}{DTNB } & \multicolumn{4}{c}{JRip} & \multicolumn{4}{c}{NNge} &
\multicolumn{4}{c}{OneR} & \multicolumn{4}{c}{PART} & \multicolumn{4}{c}{Ridor} \\
\hline
Number correct & 9.5900 & $\pm$ & 1.16 & 9.5600 & $\pm$ & 1.22 & & 9.5600 & $\pm$ &
1.22 & & 9.5000 & $\pm$ & 1.24 & & 8.9500 & $\pm$ & 1.34 & & 9.6000
& $\pm$ & 1.16 & & 9.3000 & $\pm$ & 1.34 & & 9.1700 & $\pm$ & 1.42 & \\
\end{tabular} \scriptsize \par}
\end{table}
\end{document}


\documentclassand ends with\end{document}– percusse Sep 2 '12 at 20:10