I used to use ctrl+enter to create aligned equation in LyX. But since I updated to the last version, that does not seem to be working the same way anymore.

I am trying to creat something like this (I wrote this before I updated LyX, and it still worked) enter image description here

The important resources that I need here are the equations that align along the equal sign and that each equation can be numbered. In Lyx, it used to look like this:

enter image description here

I tried using arrays and using rcl as the horizontal alignment option, but that environment does not allow to number each equation separatly and there is less spacing between the equations. It would look like this:

enter image description here

Does anybody know a way around this?

  • I don't know LyX, but I suspect it uses in this case eqnarray which a bad spacing around the alignment point. Isn't there a way to make it use the align environment from amsmath? – Bernard Jun 21 '17 at 14:59
  • @Bernard The latest version seems to use align by default. – Torbjørn T. Jun 21 '17 at 15:00
  • 1
    By latest version, I take it you mean 2.2.3? Ctrl + Enter in a standard display math works fine here (LyX 2.2.3, Kubuntu), it converts the \[ .. \] to an align* environment. How exactly doesn't it work on your system? Finally, the same environment is available via Insert --> Math --> AMS align. – Torbjørn T. Jun 21 '17 at 15:03
  • 1
    Ah, are you inserting a third column? That's wrong. Place both = and the RHS in the second column. This is different from the Eqnarray. – Torbjørn T. Jun 21 '17 at 15:17
  • 1
    @GustavoAmarante for questions like this in the future, please always post a minimal example .lyx file (it is just a text file so you can copy/paste). For more information, please read wiki.lyx.org/FAQ/MinimalExample – scottkosty Jun 21 '17 at 16:50

Presumably in older versions of LyX, Ctrl + Enter would convert a standard unnumbered equation into an eqnarray environment. This environment uses three columns to obtain alignment, i.e.

<right aligned> & <center aligned> & <left aligned>

The latest versions instead convert it to an align* environment (from amsmath). This is a good change, because eqnarray should be avoided: eqnarray vs align

It does however work a bit differently, in that it uses two columns to obtain alignment,

<right aligned> & <left aligned>

So now in newer versions of LyX, don't add the third column, instead add both = and the RHS in the second column. The third column is again right aligned, as the columns in an align form rl pairs, see e.g. What does a double ampersand (&&) mean in LaTeX?

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.