[Tex/LaTex] How do we add aligned equations in lyx . (For IEEE Transaction document)

equationslyxmath-mode

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 from amsmath.

So you say you want aligned inside equation. The steps for that will be:

  1. 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.)

  2. Insert --> Math --> Aligned environment. Now you should have something like this:

    enter image description here

    (The first blue box should contain the stuff left of &, the second box the stuff right of &, in LaTeX code.)

  3. To add a new row here, do one of the following:

    1. Hit Ctrl + Enter when the cursor is at the end of the last cell in the row.
    2. Click the Add row button in the math toolbar, which looks like this:

      enter image description here

    3. Or use the corresponding keyboard shortcut, Alt + M W I

If you want align instead equation+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 an align environment automatically.

Related Question