# In what circumstances should one wrap numbers in dollars?

Here is an example to consider:

A $3.1415$ approximation for $\pi$ was known on 314 BC?


Or maybe

A 3.1415 approximation for $\pi$ was known on 314 BC?


And here is another:

We run 32 experiments, the average result was always 42\%


etc.

-
Personally I can't see any visual difference between 3.1415 and $3.1415$. It makes a difference for minus signs, however. – Martin Scharrer Apr 10 '11 at 12:37
@Martin: Some math packages change the typeface of digits in math mode, such as MathTimePro 2. – Leo Liu Apr 10 '11 at 13:32
@LeoLiu: Thanks, I didn't know. Makes sense. – Martin Scharrer Apr 10 '11 at 13:41
Some questions might be related, perhaps they can help you: the most complete answer seems to be this one by @Mico, but you might also find this question interesting. – ienissei Jan 1 '12 at 19:39
FWIW, you should probably be using $$...$$ rather than $...$. – You Jan 1 '12 at 21:02

## 2 Answers

Correct is $3.1415$ or $\numprint{3.1415}$ with the numprint package, with babel in french we have \nombre{3.1415}$. $3.1415$ is a number (mathematical object) and not a collection of digits. There are other packages to print correctly numbers. You need to separate content and form. - But $314$\,BC and $32$ would be wrong? – Christian Lindig Apr 10 '11 at 11:25 I'm not a great expert in typography 314 BC is a collection of symbols and the size and the font are not the same of the math mode. For 32, I have a problem, logically you need to write : thirty-two experiments, so I think it's better to write 32 but I think we should avoid writing this. For 42\%perhaps siunitx can do this very well. – Alain Matthes Apr 10 '11 at 11:49 There is no difference in writing 1.234 or$1.234$as long as one uses a corresponding math font, e.g. mathpazo instead of palatino – Herbert Apr 10 '11 at 12:51 yes but it's better to use numprint or siunitx or a macro from babel to write correctly a number. The other difference is to show the content: 06 82 67 42 11 is for the telephone and not for the math. I agree with you There is no difference in writing 1.234 or$1.234$as long as ... and this is why I prefer use$..$to see the content. I see a math number and not symbols. – Alain Matthes Apr 10 '11 at 12:58 @Altermundus : no, the frenchb.ldf file provides \nombre but this macro does not display a number alla numprint, it just warns the user: Package frenchb.ldf Warning: \nombre now relies on package numprint.sty – unbonpetit Apr 10 '11 at 18:35 I’ve started always using \num{123.45} from the siunitx package. This has the advantage that the numbers are internally processed so you can globally adapt the style of those numbers using the \sisetup command. For example, you could later on decide whether to display the numbers in the text style or in the math style. Furthermore, you can effortlessly control how exponential numbers are displayed and you can easily fit the numbers with units, too: \SI{12.34}{\second\per\meter}. However, I don’t use this for all numbers: page numbers, for example, are never math (“see pages 12–32”). Likewise for years, or more generally dates (“1st of January …”), chapter numbers and so on. Basically anything that looks slightly ordinal. - I like ordinal vs. non-ordinal numbers as a criterion for using $ to wrap them. – Christian Lindig Apr 10 '11 at 19:02
+1 for siunitx, super sweet package that is – romeovs Jan 1 '12 at 21:58