# Automatic line-breaks in a long display-mode equation [closed]

I have a long sequence of equalities and inequalities in a display-mode formula. Currently, this formula is longer than the page width.

Is there a way to tell LyX to automatically break the formula to two or more parts, at the equalities/inequalities symbols, according to the page width?

Here is an example formula:

$$\lim_{n\to\infty}\frac{n}{\log\log n\cdot\sum_{i=1}^{n}i\cdot f_{i}} > \lim_{n\to\infty}\frac{n}{\log\log n\cdot\text{{Const}}\cdot\sum_{i=1}^{n}(1/\log i)} = \lim_{n\to\infty}\frac{n}{\log\log n\cdot\text{{Const}}\cdot(n/\log n)} = \lim_{n\to\infty}\frac{\log n}{\log\log n} = \infty$$


And an example output (for a certain page-width) where the formula is broken to 2 lines:

$$\lim_{n\to\infty}\frac{n}{\log\log n\cdot\sum_{i=1}^{n}i\cdot f_{i}} > \lim_{n\to\infty}\frac{n}{\log\log n\cdot\text{{Const}}\cdot\sum_{i=1}^{n}(1/\log i)} =$$
$$= \lim_{n\to\infty}\frac{n}{\log\log n\cdot\text{{Const}}\cdot(n/\log n)} = \lim_{n\to\infty}\frac{\log n}{\log\log n} = \infty$$


## closed as too broad by David Carlisle, Zarko, user13907, barbara beeton, Torbjørn T.Nov 4 '16 at 20:14

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Do not use $$...$$ but $...$. For automatic line breaking you have to read the manual of (ctan.org/pkg/breqn)[breqn]. But I would not recommend that. Just do the line break manually as has been described in hundrets of post around here. – LaRiFaRi Aug 18 '15 at 7:05
• take a look at the multi-line display structures offered by amsmath (texdoc amsmath). it's generally assumed that an author knows much more about the meaning of equations than any program, however well designed. therefore, results should be better if the author decides the line breaks. – barbara beeton Aug 18 '15 at 12:25
• This is what I finally did - added line-breaks myself. – Erel Segal-Halevi Aug 19 '15 at 18:26
• I'm voting to close this question as off-topic because the op in comments said that he had fixed (although not necessarily solved) the problem. – barbara beeton Nov 4 '16 at 20:01