1

I am trying to display some numbers using a locale that formats them with dots as thousands separator and commas as decimal separators: 19.003,41.

Accordingly to this answer it can be done with babel, but I don't really want to use it throughout the entire document, I just want to be able to wrap the desired number in some tag that formats it

For example, for the number from above, I wonder if there is some way where you can do something like

\locale_number{19003.41}

and get the result 19.003,41 in the document.

1 Answer 1

2

You could perhaps load siunitx and use

\num[group-separator={.},output-decimal-marker={,}]{19003.41}

enter image description here

\documentclass{article}
\usepackage{siunitx}
\begin{document}
\num[group-separator={.},output-decimal-marker={,}]{19003.41} 
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .