I have a table containing both real values and text. I would like to align the values to the dot, but I do not know how to do it.
I tried to use the siunitx option {S[table-format=3.2]}, but it did not work.
Here's my code:
\begin{table}[!h]
\begin{center}
\begin{tabular}{c c c c}
\toprule
& apple & banana okay & peach \\
& tree & green garden & beach \\
\hline
aaa & \textbf{--36.68} & --20.10 & --17.35 \\
bbb & \textbf{--51.18} & --12.15 & --28.33 \\
ccc & --8.33 & --6.40 & \textbf{--14.47} \\
ddd & \textbf{--53.01} & --18.09 & --16.78 \\
eee & \textbf{--74.02} & --12.26 & --58.64 \\
fff & \textbf{--57.15} & --19.58 & --23.81 \\
ggg & \textbf{--47.56} & --17.90 & --15.26 \\
\bottomrule
\end{tabular}
\captionsetup{width=0.85\linewidth}
\caption{Caption text }
\label{tab:TAB-TAB}
\end{center}
\end{table}
And here's the current output:

How can I align the values among the dot?



dcolumnpackage is used. – franziska Jul 27 '17 at 19:08\centeringinstead of the center environment. – JPi Jul 27 '17 at 19:24