[Tex/LaTex] Horizontal spacing after equation

alignequations

I have the following snipped in my LaTeX document:

\begin{align}
  \sum_{j=1}^{m}x_{ij} &= 1 \text{ for } i = 1,2,...,n
  \sum_{i \in P_k}x_{ij} &\leq 1 \text{ for } j = 1,2,...,m \text{; } \forall k
\end{align}

As you can see, the = and \leq are aligned, and there is some conditional text after the RHS of each equation.

As it turns out, the conditional text is also aligned, but only because both RHS's are equal. If my top RHS was equal to, say, 100 and the bottom was 1, then the conditional text would be offset.

I have two questions:

  1. How can I align two things at once? I would like the equation to be aligned on the (in)equality, but I also want the conditions to be aligned.
  2. How can I keep the equations more-or-less centred on the page, but have the conditional text off towards the right of the page (but still aligned based on their start location.

Example:

This is what I have now:

a(10i) = b for all i
  b(j) = a for all j

however this can happen with the way I have it currently laid out:

a(10i) = b for all i
  b(j) = a/10 for all j

notice that the different length RHS pushes the condition off.

What I'd like is something like:

a(10i) = b                for all i
   b(j) = a/10            for all j

with the equations centred on the page if possible.

Also, if I change the conditional text so they're variable lengths, then they should start at the same point:

a(10i) = b                for all i
  b(j) = a/10             for all j > 5

Notice that the equations are centred on the page and aligned on the equality, and the conditions are off towards the right, but still aligned from their start location.

Best Answer

How does the following look?

\begin{align*}
  \alpha+\beta\sum_{j=1}^{m}x_{ij}  &=1&     &\text{for}\ i = 1,2,\ldots,n\\
  \sum_{i \in P_k}x_{ij}            &\leq1&  &\text{when}\ j = 1,2,\ldots,m \text{;}\ \forall k
\end{align*}

enter image description here

Related Question