How do we add aligned equations in lyx . (For IEEE Transaction document)?
There is no option for insert -> math -> numbered equations. Moreover how do align the equation just like we do in latex using '&'
Currently I'm writing the equations in Latex and then adding it to Lyx using Tex Mode. is there a better way to do this?
Edit :
I actually need something like this
\begin{equation}
\begin{aligned}a & =5 \\ = 7-2 \end{aligned}
\end{equation}
But the latex source of LyX gives me something like this:
\begin{equation}
\begin{aligned}a & =5\end{aligned}
\begin{aligned} & =6-1\end{aligned}
\end{equation}
How can I correct this? Should I use multiline AMS?
I couldn't find an option to add row. can you please tell the exact steps.
Best Answer
Look just a little bit further down the Insert --> Math menu, and you'll find for example AMS align environment, which inserts an
align
environment fromamsmath
.So you say you want
aligned
insideequation
. The steps for that will be:Insert --> Math --> Numbered Formula.
(Or you can hit Ctrl + Shift + M to insert an unnumbered displayed equation, and then hit Alt + M N to turn it into a numbered one.)
Insert --> Math --> Aligned environment. Now you should have something like this:
(The first blue box should contain the stuff left of
&
, the second box the stuff right of&
, in LaTeX code.)To add a new row here, do one of the following:
Click the Add row button in the math toolbar, which looks like this:
Or use the corresponding keyboard shortcut, Alt + M W I
If you want
align
insteadequation
+aligned
, so that every line is numbered, skip step 1, and choose AMS align environment instead of Aligned environment. Or, if you insert a standard numbered equation, and then hit Ctrl + Enter, it will be converted to analign
environment automatically.