Search:   Help



LyX documentation


Shared groups



<< | Page list | >>

How can I prevent LaTeX from inserting a linebreak in an inline formula?


If I have an inline formula at the end of a line, LaTeX may break this formula and split it over two lines. How can I prevent this?

Quick solution

Put the formula inside an mbox

Detailed solution

  1. Enter to math mode (either for inline formula or display formula)
  2. Type \mbox and then a press ENTER or SPACE
  3. The text "\mbox" disappears and a blue box appears in its place
  4. Select math mode (again!)
  5. Type the equation inside the box

Example file


Another solution

This solution simply prevents line breaking formulas unless a very extreme case happens. To use this solution just add the following lines to the latex-preamble:


setting the number to 10000 will prevent all the line breaks, including in extreme cases.

example linebreak inlineformula

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2012-01-31 15:10 UTC