Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have the following line:

$P(can't\,communicate)
  = \frac{\#\,of\,combinations\,of\,4\,different\,keys}
         {total\,possible\,arrangements}
  = \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
add comment

1 Answer

up vote 6 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)

 \begin{align}
 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 \%
 \end{align}
share|improve this answer
    
Didn't know about \text within the math environment, that solves that. Thanks! –  coffee Oct 11 '10 at 16:52
add comment

Your Answer

 
discard

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