# Typesetting temperature, should I write the number inside dollars?

Are there any advice which one is more preferable:

The temperature is $5$ degrees Celsius.


or

The temperature is 5 degrees Celsius.


Here, I don't want to use siunitx or anything similar to typeset the degree symbol.

-
If it's just informative, or part of the text, without dollars. If it's part of a problem, or with some calculation involved, then math. That's my point of view. – Manuel Jun 25 '14 at 12:24
Duplicate tex.stackexchange.com/q/185193/3929 – daleif Jun 25 '14 at 12:25
IMHO, documents should use the same font for math numbers as for textual numbers, so you shouldn't see any difference in the output. Packages like {times} violate this, so $5$ would be in Computer Modern, and 5 would be in Times -- ugh! So, I think it's just up to your personal choice here. – John Wickerson Jun 25 '14 at 12:25
@JohnWickerson What if you want to use old style figures? – Manuel Jun 25 '14 at 12:27

You should write numbers that are "equations" (not "text") as equations, i.e., in $$...$$ ($...$ is a semi-deprecated way of writing inline equations; I don't use it because it is too easy to mess up opening-closing with it). This because the text font might render digits very differently than the math font does. Most font combinations don't, so visually the effect is probably hard to notice most of the time.
It leaves me wondering why $...$ is “semi-deprecated”. We all know that $$...$$ is a Plain TeX definition that should not be used. The only benefit of $$...$$ I see is compatibility with some WordPress MathJax scripts that automatically detect inline and displayed formulæ using the slash-paren or slash-bracket pattern. However, there are some that correctly interpret dollar signs if they are not escaped. Besides that, source code like let $$a$$ equal to $$5$$ seems more messy to me than a clearer let $a$ equal to $5$. Again, who declared that it is semi-deprecated? – Andreï Kostyrka Mar 28 '15 at 17:02