# use dcolumn with the same font as the rest of text and bold

I have been searching the web for the past hours and cannot find an answer to this question.

I have stumbled upon: 1. `\newcolumntype{T}[3]{>{\textfont0=\the\font\DC@{#1}{#2}{#3}}c<{\DC@end}}`

which allows me to use dcolumn with the same font type as the rest of the text and

1. `\newcolumntype{B}[3]{>{\boldmath\DC@{#1}{#2}{#3}}c<{\DC@end}}`

which puts the text of a certain cell in bold.

What I am looking for is to combine both 1 and 2, resulting in some sort of macro that allows me to use boldface of text font in some cells.

Thank you and best regards !

• Welcome to TeX.SE. What you are trying to achieve can be done with the machinery of the `dcolumn` package. That said, it would be considerably easier to achieve by loading the `siunitx` package and its `S` column type. Please post some example code that you'd like to format in a certain way. – Mico Jul 23 '17 at 16:20
• thank you Mico. But could you please help me achieving this using dcolumn? Consider a column "x.yz", whose contents are already aligned by decimal point using \newcolumntype{T} descbribed above. Now i want to set a number in that column to bold, maintaining the textfont. – Peter Jul 23 '17 at 16:20

``````\newcolumntype{Z}[3]{>{\bfseries\textfont0=\the\font\DC@{#1}{#2}{#3}}c<{\DC@end}}
• @Peter which command is shown as undefined? The only command I added was `\bfseries` which is defined in the latex format. – David Carlisle Jul 23 '17 at 17:35