After reading some answers on the site, I'm trying to use dcolumn pacakge in order to add horizontal alignment to my tables.
Unfortunately without success so far.
I'm writing as a part of a group so I shouldn't added packages that may affect others, that's why I'm trying to figure it w/o adding the siunitx package.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{ctable}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{dcolumn}
\newcolumntype{d}[1]{D{.}{.}{#1} }
\begin{document}
\begin{table}[]
\centering
\begin{tabular}{@{}lc*{4}{d{1.5}}@{}}
\toprule
{} & {} & \multicolumn{2}{c}{Group A} & \multicolumn{2}{c}{Group B} \\
\cmidrule(lr){3-4} \cmidrule(l){5-6}
Types & Character & Results A & Results B & Results A & Results B \\
\midrule
\multirow{3}{*}{Main}
{} & The Good & .111 & .789_{b}^{b} & .520 & .555_{b}^{a} \\
{} & The Bad & .111 & .636_{b}^{al} & .520 & .730_{b}^{al} \\
{} & The Ugly & .111 & .525_{b} & .520 & .696_{b} \\
\bottomrule
\end{tabular}
\caption{Caption}
\label{tab:my_label}
\end{table}
The result is:
Please help me solve this puzzle, also I need to add bold to some values in the table, and since switching to dcolumn I've removed the $n$ I've had and therefore \mathbf seems not to work any more. What would be the solution in that case?




siunitxbut, imho, you should take a careful look at it, for it is very well crafted and resourceful. Besides, you do loaddcolumndon't you? – gusbrs Jan 21 '19 at 16:00