Formatting – Use of Comma in Numbers as Decimal Marker in German and Other European Languages

formattingmath-mode

In German the comma rather than the period is used as a decimal separator and the dot is used as a thousands separator: 12.345,67. The comma creates some unwanted space when used as in $12.345,67$. Is there a light-weight package or some macro to support this? (I'm not looking for automatic formatting like insertion of a thousands separator.)

\documentclass{minimal}
\usepackage[utf8]{inputenc}

\begin{document}
Der Preis beträgt $12.345,67$ Euro.    
\end{document}

Der Preis beträgt $12.345,67$ Euro.

An easy fix is typing $12.345,{}67$ but I think this is too cumbersome.

Best Answer

Use the icomma package.

The effect can also be achieved with the siunitx package and its output-decimal-marker setting, although you'll have to pass numbers to the \num macro.