This works great, until the lines become too long to fit on the page. Ideally, I'd like to use something like the multline environment on one line to accomplish this. For instance, I'd like overly long lines to wrap, while still aligning, like this:

This question came from our site for professional and enthusiast programmers.

2

this is a good questionm and i'd like to add a request for a good answer to the amsmath request list. please send an actual workable example or two to tech-support@ams.org and i will put it on our list, to be considered for the next upgrade.
–
barbara beetonMay 4 '11 at 20:24

This seems to be a bug that I can not reproduce anymore with mathtools package 1.12.
–
mafpDec 5 '12 at 21:46

@mafp I just tried with mathtools 1.12 and got the same behavior. In particular, the lines of the equations are flushed left. This looks ugly in a larger proof that uses the full width of the text area.
–
Ed McManDec 6 '12 at 18:17

@EdMcMan That is odd. Then maybe it is a regression in amsmath? My package is old: version 2.13. As I said, it works for me, the multilined block starts on the same horizontal position as the equal sign of the equation below. Did you do as Barbara asked, and contacted ams.org?
–
mafpDec 6 '12 at 20:45

@mafp I was mistaken. The second multiline is not left aligned, but is right aligned to the first multiline. I edited the example in my question to make this apparent. It should now be possible to see the real problem, which was not clear before the edits: the second multiline should be right aligned to the align environment, not the multiline environment. I hope the question is more clear now!
–
Ed McManDec 7 '12 at 16:35