0

When I enter a number, for instance 10.2 in either an equation environment or within $...$, the dot is not appearing and instead I get an empty space. So for instance, I've typed:

$d_p = 5.12 \cdot 10^{-4} m$.

and what I get is: 5 12·10−4m.

I'm using a template, so there are many packages. For math and symbols I'm using the following:

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{fixmath}
\usepackage{array}  
\usepackage{units}
\usepackage{trfsigns}                                                
\usepackage{textcomp}                                               
\usepackage{gensymb}
\usepackage[integrals]{wasysym} 
\usepackage[version=3]{mhchem}
\usepackage{ziffer}                                                 
\usepackage{dsfont}                                                 
\usepackage{upgreek}

Does anyone know why this happens?

  • 7
    Even looking into the chrystal ball of wisdom does not reveal an answer unless you provide your document. – user31729 Apr 3 '17 at 12:39
  • 7
    You have a hungry dot eater in your computer. And seriously: please prepare a MWE, so we can reproduce your problem. – Przemysław Scherwentke Apr 3 '17 at 12:39
  • @ChristianHupfer hah sorry guys, kinda new to this. I've added some more details, but not sure if it's enough? – egil137 Apr 3 '17 at 15:56
  • 1
    Hi egil137 welcome to the site: Please read this post and do your best to follow the advice. Construct the MWE and see if the problem is still there. If you add \documentclass{article} \begin{document} $d_p = 5.12 \cdot 10^{-4} m$. \end{document} to your MWE you've provided and the problem goes away, then it's not enough. P.S.: Seems like it is enough – Au101 Apr 3 '17 at 15:58
  • Well, simply by commenting out lines in your preamble it's the ziffer package that's doing it, I can tell you that. And this is precisely what ziffer is there to do: click if you don't want that behaviour, why are you using the package? – Au101 Apr 3 '17 at 16:00
3

The reason for this is the ziffer package, which exists precisely to achieve this behaviour:

The pack­age mod­i­fies the be­haviour of char­ac­ters in maths mode so that:
‘.’ is used as a one-thou­sand sep­a­ra­tor (as is com­mon in Ger­many)
‘,’ is used as a dec­i­mal sep­a­ra­tor (as is com­mon in Ger­many)
‘--’ is rep­re­sented with spac­ing as ap­pro­pri­ate to such con­structs as ‘1.000,--’.

https://www.ctan.org/pkg/ziffer?lang=en

You can see this working if you modify your example:

$d_p = 5,12 \cdot 10^{-4} m$.

enter image description here

So the . is being used to provide a small space to separate the thousands.

$d_p = 5.120.000$.

enter image description here

This is what ziffer is for, if you do not want this behaviour, you should not load the package.

In other news, if d_p is a length in metres, you should consider using the siunitx package to typeset it. The metres sign should never be italic and it needs to be separated from the value:

\documentclass{article}
\usepackage{amsmath}
\usepackage{siunitx}

\begin{document}

$d_p = \SI{5.12d-4}{\metre}$.

\end{document}

enter image description here

  • ziffer is a package that should not used at all, in my point of view – user31729 Apr 3 '17 at 16:15
  • Many thanks! I will definitely get rid of that package. – egil137 Apr 3 '17 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.