The question is similar to this: Decimals in table don't align with dcolumn when bolded
I want certain numbers in a table with dcolumn to be italic and to align with the others. I tried something similar to what was proposed for bold numbers:
\newcolumntype{I}[3]{>{\textit\DC@{#1}{#2}{#3}}c<{\DC@end}}
However, it doesn't work.
Example:
\documentclass[12pt]{article}
\usepackage{dcolumn}
\newcolumntype{.}{D{.}{.}{-1}}
\makeatletter
\newcolumntype{B}[3]{>{\boldmath\DC@{#1}{#2}{#3}}c<{\DC@end}}
\makeatother
\begin{document}
\begin{tabular}{..}
\hline
1.5 & 0.19 \\
\multicolumn{1}{B{.}{.}{-1}}{2.75} & 4.2 \\
3.4 & \textit{8.0} \\
\hline
\end{tabular}
\end{document}