TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following line:

  = \frac{\#\,of\,combinations\,of\,4\,different\,keys}
  = \frac{\frac{10*9*8*7}{4}}{2025}
  = \frac{1260}{2025} = 0.62 = 62 \% $

This doesn't all fit on one line, so the "= 0.62 = 62 %" falls under a new line, but it is stretched across to fill the WHOLE LINE.

Why is this, and how can I stop it from happening? I just want it to look standard..

share|improve this question
up vote 7 down vote accepted

I think it is due to your spacing using \,. If you want to type text inside math environment use \text{} from amsmath. In your case you can use

 $P(\text{can't communicate})
   = \frac{\#\text{ of combinations of 4 different keys}}
          {\text{total possible arrangements}}
   = \frac{\frac{10*9*8*7}{4}}{2025}
   = \frac{1260}{2025}  = 0.62 = 62$

Since it is too long it is better if you don't use inline math and use some equation or align environment, e.g. (using the align environment from amsmath package)

 P(\text{can't communicate}) 
  & = \frac{\#\text{ of combinations of 4 different keys}}
           {\text{total possible arrangements}}\\
  & = \frac{\frac{10*9*8*7}{4}}{2025}\\
  & = \frac{1260}{2025}\\
  & = 0.62\\
  & = 62 \%
share|improve this answer
Didn't know about \text within the math environment, that solves that. Thanks! – coffee Oct 11 '10 at 16:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.