## Numerical Constants are Math

Suppose we want to input the following sentence in LaTeX:

Therefore, the approximation ratio is 42.

Here is the obvious way:

Therefore, the approximation ratio is 42.

It works well, hmm, until that one day when you decide to change your math font. The correct way should be:

Therefore, the approximation ratio is $42$.

The dollar signs have a semantic meaning: “42″ is in the mathematical context, just as how we would input $x^2$. So if you intend to change the math font, then you want this occurrence to use that new font as well.

In case you want to see it in effect, here is a small example that you can try:

\documentclass{article} \usepackage{ccfonts} \usepackage[euler-digits]{eulervm} \begin{document} \begin{enumerate} \item 1 $1$ -1 $-1$ one \item 2 $2$ -2 $-2$ two \end{enumerate} \end{document}

This example also shows the importance of the dollar signs when dealing with negative numbers. Without the dollar signs, the minus sign is actually a hyphen. This difference is very noticeable in the output. You can refer to this post if you want a reminder on hyphens (-), number ranges(–) and dashes(—).