# Comma as a decimal separator in (La)TeX dimensions

My girlfriend showed me dimensions in LaTeX documents typeset like this : \hspace{1,5cm} instead of what I would have thought was the correct \hspace{1.5cm} (we are french).

It seems that both syntaxes are understood by TeX and LaTeX engines even without internationalization packages.

Can you explain to me why it is so ? Did D. Knuth thought about this at the very beginning of is project, or is this more recent ?

Thanks for any pointer.

\bye

• Never heard of that. May be it is done at the editor level? – Bernard May 24 '20 at 23:06
• Nope, works everywhere. – Nicolas FRANCOIS May 24 '20 at 23:11
• This feature was added into TeX on 23 Dec 1982, according to the TeX error log. – ShreevatsaR May 25 '20 at 6:51

@d continental_point_token=other_token+"," {decimal point, Eurostyle}

• @NicolasFRANCOIS Nonetheless the core support (+1 for the answer) my suggestion is that it will be better if you get used to typing always dots and only dots, or things as \usepackage[margin=2.5cm]{geometry} will not work. – Fran May 25 '20 at 4:10
• @Fran well as always with keyval: values in commas have to be braced so it's not that it wouldn't work, but the syntax would be margin={2,5cm} – David Carlisle May 25 '20 at 7:53
• @DavidCarlisle But that means double work: type the braces, and remember to type the braces. :) – Fran May 25 '20 at 9:07