Normally in align environments, I can align equations with an additional column on the right explaining the steps, eg:

-1 &= x \\
-2 &= 2x && \text{multiply by 2} \\

I want to write a double inequality, so a relation aligned at 2 points, with a separate column on the right with an explanation text box. Ideally it would be something like the following, where '&' denotes no extra space between the text on the right and left, and '&&' denotes a noticeable separation:

-1 &< x &< 4 \\
-2 &< 2x &< 8 && \text{multiply by 2} \\

It seems that since columns are by default meant to have 2 aligned expressions and not 3, the 3rd expression in the inequality is its own column, meaning that whatever separation exists between the 1st two expressions and the 3rd exists between the 3rd expression and the text box. So in the {align*} environment (in the above example), there is noticeable separation between the 1st two expressions and the 3rd, and in the {alignat*} environment, everything is crowded together, with no separation between the 3rd expression and the text box.

Example using {alignat*}:

-1 &< x & < 4 \\
-2 &< 2x & < 8 & & \text{multiply by 2} \\

Regarding tables or arrays, I don't know how I would right-align the last column in this way. Anyone have any ideas?


enter image description here




-1 &< x && < 4 \\
-2 &< 2x&& < 8 & \qquad \text{multiply by 2} \\

| improve this answer | |
  • Thanks so much, this is perfect! – Tsvi Benschar Jun 25 at 21:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.