I have the following example code
\documentclass[a4paper,12pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{dcolumn}
\usepackage{tabularx}
\usepackage{multirow}
\DeclareMathVersion{nxbold}
\SetSymbolFont{operators}{nxbold}{OT1}{cmr} {b}{n}
\SetSymbolFont{letters} {nxbold}{OML}{cmm} {b}{it}
\SetSymbolFont{symbols} {nxbold}{OMS}{cmsy}{b}{n}
\begin{document}
\newcolumntype{d}[1]{D{,}{,}{#1}}
\makeatletter
\newcolumntype{B}[3]{>{\mathversion{nxbold}\DC@{#1}{#2}{#3}}c<{\DC@end}}
\newcolumntype{U}[3]{>{<<what to put here for underline cell?>>\DC@{#1}{#2}{#3}}c<{\DC@end}}
\makeatother
\begin{table}[htbp]
\begin{center}
\begin{tabularx}{\textwidth}{d{2.3}d{2.3}}
\multicolumn{1}{c}{bold}& \multicolumn{1}{c}{underlined} \\
\multicolumn{1}{B{,}{,}{6.2}}{12,345} & \multicolumn{1}{U{,}{,}{6.2}}{56,789} \\
\end{tabularx}
\end{center}
\end{table}
The bold math type B
is taken from the Z
type from here and it works perfectly.
What do I have to put in the U
type at <<what to put here for underline cell?>>
to get an underlined cell?
I already tried \underline
and \uline
from the ulem
package but both resulted in errors. Is this somehow possible with the dcolumn
package?
Thanks for your help