Math & ScienceCustomized alignment within a multi-line math environment?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
Elephant McGee
Posts: 1
Joined: Sun Mar 03, 2013 10:23 pm

Customized alignment within a multi-line math environment?

Post by Elephant McGee »

I'm trying to display a multiple-line math equation. There are a few equals signs, which should be aligned or at least flushed left.

The main question is this:

I have a line that's just a little too long to fit on one line. I'd like the overflow to be flushed to the right, since it's more natural to not have to go all the way back to the left to find the remainder. At the very least, though, it should be aligned after the equals signs. I've read that I shouldn't use eqnarray (and its spacing is ugly anyway), but I've also read that align and similar environments don't want a spacing marker after the equals signs (necessary to align the overflow after the equals sign). Is there a way to tell it to flush just the overflow to the right manually, or even better, an environment that will do these things automatically?

What I want would look something like:

Code: Select all

expression 1
= very very very very 
               long expression
= expression 2
(alignment of the first line isn't too important).

As a bonus, I'd like to be able to get a multline type alignment when my expression gets even longer, where the final line is flushed right, but the ones between the first part after an equals sign are centred.

Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply