4

I know that using this MWE

\documentclass[12pt]{article}
\usepackage{amsmath,amssymb}
\begin{document}
$s=1,0\, \text{m}$
\end{document}

it gives me a bad spacing between the comma and the 0. In fact the screenshot is:

enter image description here

But if I use the curly brackets {,} I have the same result with the icomma package.

\documentclass[12pt]{article}
\usepackage{amsmath,amssymb}
\begin{document}
$s=1{,}0\, \text{m}$
\end{document}

enter image description here

\documentclass[12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{icomma}
\begin{document}
$s=1,0\,\text{m}$
\end{document}

enter image description here

Is fontmath.ltx the cause of this space?....from

\DeclareMathSymbol{,}{\mathpunct}{letters}{"3B}

Are there better alternative methods than my MWEs that I have written without to use siunitx package?

Sebastiano
  • 54,118
  • 2
    If the main use in your document for , while in math mode is to denote the decimal marker, loading the icomma package has got to be the simplest way to achieve your formatting objective. From the package's user guide: "the comma will be typeset as a punctuation character if the next input character is a space; otherwise the comma is treated as a decimal separator." – Mico Oct 14 '21 at 21:50
  • @Mico I thank you immensely for your comment. – Sebastiano Oct 14 '21 at 21:52
  • Does this question and answers provide the proper explanation for your needs? https://tex.stackexchange.com/questions/303110/avoid-space-after-commas-used-as-thousands-separator-in-math-mode – Steven B. Segletes Oct 15 '21 at 13:32
  • @StevenB.Segletes Very kind Steven, yes naturally it is provide the proper explanation. I use your same word. Now I closed the question as a duplicate. Thank you very much. I not remember all the question on this site :-) My best regards. – Sebastiano Oct 15 '21 at 19:57

0 Answers0