If you ever wrote a document in latex (or tex) that used inline formulas you know how frustrating it is when latex insists on breaking you inline formula across two lines. The easiest solution to this problem, in my opinion is to prevent line breaking inline formulas at all except under extreme cases. To prevent line breaking inline formulas just add the following two lines into your preamble:

`\relpenalty=9999`

\binoppenalty=9999

Now I will explain what we did. `\relpenalty=[number parameter]`

the parameter speciļ¬es the penalty for breaking a math formula after a relation when the formula appears in a paragraph. Plain TEX sets `\relpenalty`

to 500. `\binoppenalty=[number parameter]`

the parameter speciļ¬es the penalty for breaking a math formula after a binary operator when the formula appears in a paragraph. Plain TEX sets `\binoppenalty`

to 700. Both parameters can be set anywhere from 0 to 10000. If set to 10000 the inline formulas will never break even in extreme cases. Setting it a bit lower would prevent line breaking except where tex would encounter extreme cases which must have a line break because of the situation.