# How to use sans-serif in dcolumn (decimal alignment)?

I am setting some timetables in a sans font. I'd like to use dcolumn for aligning the times on the decimal point, but the package assumes you are using math.

Is there an easy way to defeat this and have dcolumn set the columns in the current or specified font? I will not be needing any math symbols.

• Jan 21 '20 at 22:04
• Thanks you — nice idea; unfortunately it has no effect at all. No matter, there are other ways. Jan 21 '20 at 22:20

You can use sansmath:

\documentclass{article}
\usepackage{dcolumn,sansmath}

\newenvironment{sftabular}
{\sffamily\mathversion{sans}\tabular}
{\endtabular}

\begin{document}

\begin{sftabular}{lD{.}{.}{2.2}}
xyz &  2.1 \\
abc & 12.2 \\
uvw &  1.21
\end{sftabular}

\end{document}