I want to align some decimal columns in a tabular on their decimal point. I tried to accomplish this with the dcolumn package, but when I use it as listed in the following, my column width gets bloated that it will not fit on the page (A4).
\usepackage{dcolumn}
\usepackage{hhline, multirow, array, cellspace}
\setlength{\cellspacetoplimit}{3pt}
\setlength{\cellspacebottomlimit}{3pt}
\newcolumntype{.}{D{.}{.}{-2}}
...
{\setlength{\doublerulesep}{1em}
\centering
\begin{tabular}{*{3}{ | Sc | Sc | S. |}}
\hhline{---||---||---}
\multicolumn{1}{|Sc|}{\multirow{2}{*}{\textbf{Symbol}} } &
\multicolumn{2}{Sc||}{\textbf{Probability}} &
\multicolumn{1}{Sc|}{\multirow{2}{*}{\textbf{Symbol}} } &
\multicolumn{2}{Sc||}{\textbf{Probability}} &
\multicolumn{1}{Sc|}{\multirow{2}{*}{\textbf{Symbol}} } &
\multicolumn{2}{Sc|}{\textbf{Probability}} \\
\hhline{|~|--||~|--||~|--}
& \textbf{abs.} & \textbf{rel. [\%]} &
& \textbf{abs.} & \textbf{rel. [\%]} &
& \textbf{abs.} & \textbf{rel. [\%]} \\
\hhline{---||---||---}
A & 22 & 81.16 & J & 3 & 0.16 & S & 34 & 6.32 \\
B & 104 & 1.49 & K & 58 & 0.77 & T & 33 & 9.05 \\
\hhline{---||---||---}
\end{tabular}}
Without dcolumn alignment:
\begin{tabular}{*{3}{ | Sc | Sc | Sc |}}
With dcolumn alignment:
\begin{tabular}{*{3}{ | Sc | Sc | S. |}}
Can someone please help me to align the decimal values in a compact way?