For an online Moodle test I want to type numbers like \(0,1040\) where the decimal separator would be a comma and not a dot (à la French). How can I get rid of the space between the comma and the first decimal digit without any package?
Asked
Active
Viewed 776 times
2
Dimitris
- 1,405
1 Answers
3
You probably want icomma package.
It allows you to put a space after a comma only if there is the actual space there.
\documentclass{article}
\usepackage{icomma}
\begin{document}
\( 1,25 \quad 1, 25 \quad (0,7) \quad (0, 7) \)
\end{document}
antshar
- 4,238
- 9
- 30
-
2Thanks but I wrote I am looking for a not-based-to-any-package workaround. (Moodle environment supports but the basic (La)Tex). – Dimitris May 22 '20 at 12:48

\(0{,}1040\). This works with (La)TeX. If Moodle does not actually use real (La)TeX as a backend to produce the output, but rather uses MathJax or something similar this may or may not work. – moewe May 21 '20 at 15:01\( \)or$ ... $are passed directly to MathJax, so it depends more on MathJax than LaTeX... like https://stackoverflow.com/questions/45173530/mathjax-commas-in-digits, although I have no idea how to put that in the XML output... – Rmano Jun 26 '20 at 08:12