[Tex/LaTex] Change commas to dots in math mode

math-modesymbols

I am writing an article in a European language, so I included a language package. However, this inclusion changes ALL points to commas in mathmode, because commas are the european decimal separator.

That's fine, but at some point, I want to use a dot as thousandths separator, e.g.

$ 63.001,07 $ 

However, if I write a dot, it is converted to a comma anyways. How can I avoid this without disturbing the rest of the document? I am looking for the simplest and easiest solution.

Some of the packages I'm using are:

\usepackage[utf8]{inputenc} 
\usepackage[spanish]{babel}
\usepackage{ae}

Best Answer

\documentclass{article}
\usepackage[spanish,es-nodecimaldot]{babel}
\begin{document}
$2.3$
\end{document}

2.3

For thousands separators, is better a small space. The package siunitx can do that automatically, so you can write $\num{63001. 07}$ as well as $\num{63001,07}$ and forget the thousands, but if you insist in a comma:

\documentclass{article}
\usepackage{siunitx}
\sisetup{group-separator = {,}}
\usepackage[spanish]{babel}
\begin{document}
$\num{63001.07}$
\end{document}

63,001.07

Or inversely, as usual in Spanish:

\documentclass{article}
\usepackage[]{siunitx}
\sisetup{group-separator = {.}}
\sisetup{output-decimal-marker = {,}}
\usepackage[spanish]{babel}
\begin{document}
$\num{63001,07}$
\end{document}

63.001,07