# Using dcolumn with \underset in LaTeX

I am using the dcolumn package in LaTeX to align by ".". It works well with

\newcolumntype{.}{D{.}{.}{-1}}
\begin{tabular}{l . . . . . . . . . }


However, I want to include the standard errors of the estimates using \underset{std}{est}.

This causes problems and I can't find a fix. One way around it is to create separate rows for the standard errors. This does not look as nice though. Is there a way around combining \underset and dcolumn or am I facing a trade-off?

Thanks, to illustrate, these two examples will work:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{tabular}{l c }
& \multicolumn{1}{c}{Est.} \\
$\alpha$ & $\underset{(2.21)}{22.12}$ \\
$\beta$ & $\underset{(1.82)}{0.32}$ \\
\end{tabular}
\end{document}


and

\documentclass{article}
\usepackage{dcolumn}
\newcolumntype{.}{D{.}{.}{-1}}
\begin{document}
\begin{tabular}{l . }
& \multicolumn{1}{c}{Est.} \\
$\alpha$ & $22.12$ \\
$\beta$ & $1.82$ \\
\end{tabular}
\end{document}


... but the combination does not

\documentclass{article}
\usepackage{amsmath}
\usepackage{dcolumn}
\newcolumntype{.}{D{.}{.}{-1}}
\begin{document}
\begin{tabular}{l . }
& \multicolumn{1}{c}{Est.} \\
$\alpha$ & $\underset{2.21}{22.12}$ \\
$\beta$ & $\underset{1.82}{0.32}$ \\
\end{tabular}
\end{document}

• Welcome to TeX.sx! – cmhughes Mar 15 '13 at 18:08
• The way that dcolumn works means that this is pretty much doomed to failure. I'd just use two rows and align them properly: is there a reason you can't do that? – Joseph Wright Mar 16 '13 at 10:11
• @JosephWright: The reason is twofold: (1) I am not able to produce similar looking results with the extra row and (2) adding an extra row adds to the complexity in the Matlab code that generates the TeX code. – Kasper Olesen Mar 16 '13 at 14:37

The way that dcolumn works means that there really is no way to get an underset or similar construct to work and align correctly. You will need to split the input into two rows, or forego the alignment.