I want to typeset a table where certain numbers are going to appear red. In order to achieve the correct alignment I am using the dcolumn package. The problem is that the parsing that dcolumn does, prevents the correct appliance of color.
In the following example, in the third row, only the "1" appears red. The dot and the "32" appears black. Using \textcolor
results in a syntactical mistake.
I tried using siunitx, but unfortunately, since I am producing programmatically hundreds of tables, the compilation time increased too much (more than a minute)
So the question is, how can you color a number belonging in a dcolumn?
\documentclass[]{article}
\usepackage{xcolor}
\usepackage{tabu}
\usepackage{dcolumn}
\newcolumntype{d}[1]{D{.}{.}{#1}}
\begin{document}
\begin{tabu}{cd{2}}
note & 1.32\\
\color{red}note & 1.32 \\
\color{red}note & \color{red}1.32 \\
% note & 1.32\\
% \textcolor{red}{note} & 1.32 \\
% \textcolor{red}{note} & \textcolor{red}{1.32} \\ % results in a compilation error.
\end{tabu}
\end{document}