# no new lines in lyx output from the latex code insertion

      \begin{widetext}
\begin{displaymath}
a+b=c;\\
d+e = f;\\
e+m = n;\\
\end{displaymath}
\end{widetext}


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 ?

-
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
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
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
@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:

\begin{widetext}
\begin{align*}
a+b& =c;\\
d+e &= f;\\
e+m &= n;\\
\end{align*}
\end{widetext}


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:

\begin{widetext}
\begin{align}
a+b &= c; & a'+b'&= c'\\
d+e &= f; & d'+e' &= f'\\
e+m &= n; & e'+m' &= n'\\
\end{align}
\end{widetext}


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

\begin{widetext}
\begin{gather*}
a+b =c;\\
d+e = f;\\
e+m = n;\\
\end{gather*}
\end{widetext}

-