# What formatting is perfect for word in an equation? [duplicate]

Possible Duplicate:
What is the “correct” way of embedding text into math mode?

What formatting is perfect for word in an equation? Is \text{ text is here } the best way? For example,

a = x_j \text{ for } i = 1, 2, \dots, M

-

## marked as duplicate by doncherry, lockstep, Marco Daniel, Hendrik Vogt, Stefan Kottwitz♦Oct 10 '12 at 7:58

Yes, and you could also use \mbox{ text is here }, but this will not scale to where it's used. Some also use \ \text{text is here}\ . –  Werner Oct 10 '12 at 5:46
The whitespace before and after the text does look to close to the math. Is \  there to fix that? –  qazwsx Oct 10 '12 at 5:50
Yes, the \  is there to add additional space, but I think $a = x_j \text{, for } i = ... is better, but really up to you which to use. – Peter Grill Oct 10 '12 at 6:04 ## 1 Answer Not sure whether this is an answer... Spaces are gobbles and replaced with appropriate math spacing when in math mode. However, forced spacing always sets the same; there is no difference in the spacing between the following alternatives: \documentclass{article} \usepackage{amsmath}% http://ctan.org/pkg/amsmath \begin{document}$a = x_j \text{ for } i = 1, 2, \dots, M$\par$a = x_j\ \text{for } i = 1, 2, \dots, M$\par$a = x_j \text{ for}\ i = 1, 2, \dots, M$\par$a = x_j\ \text{for}\ i = 1, 2, \dots, M$\par$a = x_j \text{~for~} i = 1, 2, \dots, M$\par$a = x_j~\text{for~} i = 1, 2, \dots, M$\par$a = x_j \text{~for}~i = 1, 2, \dots, M$\par$a = x_j~\text{for}~i = 1, 2, \dots, M\$