d+e = f;\\
e+m = n;\\

I am using the above code as an inserted Tex Code in Lyx but I do not get any new lines whether I use \\ or \newline. How do I correct this ?

  • 4
    You can't have linebreak with display math. Use align*, or gather* if you don't want alignment points. – Bernard Jul 28 '14 at 21:22
  • 1
    Why are you inserting the LaTeX code rather than using the LyX math editor? – Jim Oldfield Jul 28 '14 at 22:00
  • Because I did not know how to use the widetext in lyx. So I directly put the code there. – user25957 Jul 29 '14 at 0:00
  • 3
    Indeed LyX does not support widetext environment. However because your math is inside of it, you could have ERT \begin{widetext} and then normal LyX math or align or however you choose and then afterwards ERT \end{widetext}. It just comes down to a matter of preference though. – scottkosty Jul 29 '14 at 3:38
  • 1
    @scottkosty You both did in my opinion, in different ways. (Well, you could say that Bernard answered the question as it's written, while you answered the unstated, underlying question.) – Torbjørn T. Aug 3 '14 at 6:55

You can't have linebreaks within display math. Use align*, or gather* if you don't want alignment points.

To have an alignment on the = sign, mark it with an ampersand:

     a+b& =c;\\
    d+e &= f;\\
    e+m &= n;\\

Note that you may have several alignment points. If you want to have n groups of equations with an alignment, you need 2n–1 ampersands. Example:

    a+b &= c; & a'+b'&= c'\\
    d+e &= f; & d'+e' &= f'\\
    e+m &= n; & e'+m' &= n'\\

To have a succession of centred equations, use the gather* environment:

     a+b =c;\\
    d+e = f;\\
    e+m = n;\\

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.