[Tex/LaTex] Math expression and number in text mode

best practicesmath-modetext-mode

I am writing an article for an IEEE journal. At one paragraph, I put explanation about a preceding equation like this:

where c1 = 0.0123 is a coefficient from this document.

My question, how should I type it in my latex document? Should I type the math expression this way: $c_{1} = 0.0123$, or can I do it this way: $c_{1}$ = 0.0123, or maybe like this: $c_{1} =$ 0.0123? Please attach some dependable sources if possible.

Best Answer

If

c1 = 0.0123

is text then it should be marked up as

c\textsubscript{1} = 0.0123

If it is math then it should be marked up as

$ c_1 = 0.0123 $

Using half text and half math for the same expression will produce poor spacing and/or inconsistent fonts.

Knuth in his paper cited in the answer to a related question describes an issue where he'd marked up positive numbers as 1 and negative numbers as $-1$ and then got caught out when changing the document's font setup so that math digits used a different font from text digits which had the unwanted consequence of making negative and positive numbers use different fonts. The strong recommendation is to always use math mode for math, even if it is just a minimal expression such as $1$ or $x$.