# Displaying a really long chain of inequalities

I'm trying to enter a long chain of inequalities in math display mode. If I enter the expressions as I want them to, LyX will continue displaying them off the screen - so that they don't show up when I compile the pdf (and I cannot see what I am typing). Is there a way I can enter a long chain of expressions in display mode so that LyX displays them nicely? My only option so far has been to exit display mode when I'm too far right of the screen, hit enter and go back into display mode to enter the next line. However, this doesn't look too great on the pdf, and I have no idea when is a good time to shift to the next line anyway. I'm assuming there is a proper way to do this.

-
Welcome to TeX.SE. Besides the `breqn` package there probably isn't an easy solution to automatic line breaking for display math. –  Peter Grill Nov 19 '12 at 5:41
@PeterGrill; silly question: is "breqn package" a way I'm supposed to enter the expressions or a software package that's compatible with LyX? –  The Substitute Nov 19 '12 at 5:44
No its a LaTeX package that you include in your preamble with `\usepackage{breqn}`, and then use the `dmath` environment. But I believe is has issues and may be better to just break the equations manually, after finding where they need to break. Have a look at the `breqn` questions. –  Peter Grill Nov 19 '12 at 5:50
Certainly `breqn` is not a magic bullet - breaking equations is hard work, and you still have to intervene manually in some cases. Also, I doubt that Lyx 'knows' about `breqn`, so you will have to use direct LaTeX entry ('ERT') to use it. –  Joseph Wright Nov 19 '12 at 8:23
The standard LaTeX way is to use an `eqnarray` environment and manually places the break points. The improved way is to use the alignment environments provided by the `amsmath` package; again you manually specify the break points; the spacing is better than `eqnarray`. Finally, as others mention, there is the `breqn` package that will automatically break long equations; tweaking its parameters to get output one likes can be frustrating. –  Andrew Swann Nov 19 '12 at 9:30

As people mentioned in the comments you should use `eqnarray` or `align` By default you can do it by pressing Ctrl-Enter in math mode, this will create an `eqnarray` environment. By pressing Ctrl-Enter again, you can get additional lines. Spacing should be much better than acieved by separate displayed math environments.
To use the AMS `align` environment, you should tick "Use AMS math package" (first untick "Use AMS math package automatically") in Document->Settings->Math Options. This is probably the best thing to do, as `align` is much better looking than `eqnarrary`.
`align` is not only better looking than `eqnarray`; the latter is seriously flawed under many respects and should never be used. –  egreg Feb 1 '13 at 9:50