[Tex/LaTex] Babel and the decimal separator


I'm using Babel for writing a document in spanish. However, it uses a comma instead of a period as a decimal marker (i.e. 3,14 instead of 3.14).

Is there any way to reverse the behaviour? I prefer the period, as it's done in english.

Also, I'd prefer it if it's something that can just be added to the preamble, instead of having to do it each time I want to write a number with a decimal part (like putting the period between brackets, for instance).

Best Answer

By dafault, spanish changes to a comma as decimal separator; to change to a dot, you can use \decimalpoint:


This gives the possibility to revert at any moment to a comma, using \decimalcomma or even to select a different symbol with \spanishdecimal{<symbol>}

The package option es-nodecimaldot disbales completely this decimal separator mechanism and uses a dot,leaving without effect \spanishdecimal{<symbol>}, and \decimalcomma: