4

I use LyX and it uses eqnarray for multiline equations, which is bad.

Is there a way to make LyX use align instead?

Thanks.

yoki
  • 550
  • 2
    you need to use amsmath. take a look at this: http://tex.stackexchange.com/a/103695/579 – barbara beeton Dec 09 '15 at 21:49
  • amsmath is enabled via the math options, but I still get the eqnarray. Is there some option I need to activate? – yoki Dec 09 '15 at 23:04
  • 2
    Is Insert > Math > AMS align environment what you want? – scottkosty Dec 10 '15 at 08:19
  • I hand't noticed that, thanks. Is there a convenient way to convert all my current eqnarray equations to align? Also, is there a way to make "ctrl+enter" start an align instead of eqnarray? – yoki Dec 10 '15 at 10:09
  • 1
    To convert, I believe you would need to use find/replace in a text editor (the .lyx file is just a text file). I'm not sure this is a good idea. To get ctrl+enter to start align, go to Document > Settings > Math and set amsmath to "load always". Then do "ctrl+enter". It should now do align (this won't convert old ones to align though). – scottkosty Dec 10 '15 at 16:57

1 Answers1

8

LyX has the behavior by which if AMS is not loaded, Ctrl+return does eqnarray. If it is loaded, it does align. So the solution is to go to Document > Settings > Math and click on "load always" for amsmath. Now Ctrl+return creates an align. You can convert from eqnarray to align by right-clicking the environment, and selecting AMS environment > AMS align.

Torbjørn T.
  • 206,688
scottkosty
  • 13,164