Julio Rojas wrote:
Thanks, I've already done that, but no option seems to be of help. I'm
trying to put an integer programing model and every restriction should
be numbered and aligned like:

Maximize Z                                          (1)
Subject to:
Z=sum(Xi)                                             (2)
Xi+Xj<=1                       for all i,j in P, i<j (3)
Xi,Xj in {0,1}                        for all i,j in P (4)

So, some rows are numbered, the left column is left aligned and the
right column is right aligned. How can this numbered array be done?
Julio Rojas

2009/9/2 Ignacio García <ignacio.gmora...@gmail.com>:
Julio Rojas <jcredbe...@...> writes:

Dear all, is there a way to individually label some equations of an
equation array? Or some rows from an array?
Julio Rojas

Please have a look at Help>Math (or Ecuaciones) where you can
find a very fine description of this issue in the section 19,
19.3 and/or 19.4.


Actually, I think what you want is in section 19.1. Inside an equation array environment, Alt-m n toggles numbering of the entire array (separate number on each line), while Alt-m Shift-n toggles numbering of just the line the cursor occupies.

BTW, I too write integer programs. A while back I came across a reference to an article ("Avoid eqnarray!" by Lars Madsen, The PracTeX Journal #4, 2006) that claims that eqnarray is somehow evil. The complaints are mainly about spacing (including the possibility that equation numbers are overwritten or crowded off the line). He recommends AMS math environments or the mathenv package. Then again, I came across a post on sci.op-research that as I recall advocated eqnarray.

Anyway, here's an alternative I found somewhere:

& \text{maximize } & z= & & 2x_{1} & & + & & 3x_{2} & & + & & 4x_{3}\\ & \text{subject to: } & & & 44x_{1} & & & & & & + & & 50x_{3} & \ge900\\ & & & & & & & & & & & & \llap{\ensuremath{x_{1},x_{2},x_{3}}} & \ge0


Reply via email to