3

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.

1 Answer 1

6

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.

7
  • Did you mean AMS align environment? I tried that . it allows only two lines of equations
    – Trect
    May 6, 2017 at 10:55
  • I thought of adding screenshot. But I'm not able to . as the option dissappear as soon as I click screenshot button
    – Trect
    May 6, 2017 at 10:57
  • @DheerajMPai It supports more, but you need to add new rows yourself. There is a button on the toolbar, and it's probably available via right clicking as well. May 6, 2017 at 11:11
  • I tried that. I actually need something like this \begin{equation} \begin{aligned}a & =5 \\ = 7-2 \end{aligned} \end{equation} But it gives me something lke 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.
    – Trect
    May 6, 2017 at 14:38
  • I have included the above comment in the question in a better formatted form. Sorry for bothering you repeatedely @Torbjorn T
    – Trect
    May 6, 2017 at 14:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .