22.  Lining Up Equations

      Sometimes it's necessary to line up a series of equations at some horizontal position, often at an equals sign. This is done with two operations called mark and lineup.

      The word mark may appear once at any place in an equation. It remembers the horizontal position where it appeared. Successive equations can contain one occurrence of the word lineup. The place where lineup appears is made to line up with the place marked by the previous mark if at all possible. Thus, for example, you can say ^EQ I
x+y mark = z
^EN
^EQ I
x lineup = 1
^EN
to produce

[equation]

[equation]

For reasons too complicated to talk about, when you use EQN and `-ms', use either .EQ I or .EQ L. mark and lineup don't work with centered equations. Also bear in mind that mark doesn't look ahead; x mark =1
...
x+y lineup =z
isn't going to work, because there isn't room for the x+y part after the mark remembers where the x is.