1

I need to add & just before = in the aligned environment in LyX to specify the deliminator. So

How to specify the deliminator with & in the aligned environment with LyX?

enter image description here

11
  • i don't use lyx, so i don't know what its conventions are. but is it really impossible to insert & before = in the file? and where you have & & &, two of those should be unnecessary. Commented Mar 5, 2016 at 16:31
  • @barbarabeeton the below is called Source Pane that does not allow me to input any text :/ and the above does not understand & to be the sign to specify the deliminator so I need to find some option to do it.
    – hhh
    Commented Mar 5, 2016 at 16:43
  • 1
    Note also that if you know the LaTeX way of doing it you can either do File > Import > LaTeX (plain) or you can do Edit > Paste Special > Paste from LaTeX or if you are feeling daring (in general, this is bad advice) you can try editing the .lyx file directly; often for math the LaTeX is stored there in LaTeX format (as opposed to outside of math where mostly it is in LyX's own format
    – scottkosty
    Commented Mar 5, 2016 at 17:03
  • 1
    I'm not sure I see the problem here. The empty blue boxes represent cells in the aligned-environment, which are separated with & in the generated code. So you need to add everything before = in one box, and the rest of the equation in the next box. Commented Mar 6, 2016 at 9:04
  • 1

2 Answers 2

4

Each of those blue boxes in a row specifies something that will be separated by an & in LaTeX. So while you currently have four columns with this content (e.g. on the first row):

  • Nm(1)=Nm(1+0\sqrt{-5})
  • [blank]
  • [blank]
  • Nm(ab)=Nm(a)Nm(b)

... you should instead replace it with four columns with the following content:

  • Nm(1)
  • =Nm(1+0\sqrt{-5})
  • Nm(ab)
  • =Nm(a)Nm(b)

If you want more equations in a row, use the add column button in the table toolbar at the bottom of the screen (it only appears when your cursor is in the equation).

Maybe this seems like LyX is making it hard to get to that LaTeX feature, but those LaTeX &s are column dividers, so if anything I'd say LyX's representation is closer to the philisophical meaning. BTW, a corollary of this is that you cannot have different numbers of &s in different rows, which seemed to be what you're suggesting. LyX's column system makes it impossible to accidentally do this.

Edit: As an unrelated comment, if Nm is meant to be a single identifier rather than the product of N with m, the convention is that it should have upright letters (as e.g. \sin and \exp do). Use a LyX math macro with \operatorname{Nm} for this; see e.g. this blog post for details.

2
  • Nice resources in the linked blog - thanks for the "value added" postscript.
    – Dɑvïd
    Commented Mar 6, 2016 at 9:53
  • That space will be ignored by Latex.
    – AJN
    Commented Mar 6, 2016 at 11:37
0

As Jim Oldfield answered, the first row with $I\cdot I$ and the second column with all equality signs below. Also the option Insert > Math > Aligned environment to add the aligned environment in the first hand: I did first adding the array and then the aligned but there may be more convenient ways to this, below the graphical way.

enter image description here

enter image description here

You must log in to answer this question.

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