[Tex/LaTex] Putting an equal sign both at the end and at the beginning of the line (dmath)

line-breaking

I'm using dmath for my equations, because it breaks lines automatically. I've been taught that if I have two formulae separated by an equal sign and they are on different lines then the equal sign should be present both at the end of the first line and at the beginning of the second one. (And it looks prettier, too, in my opinion.) dmath puts the equal sign only at the beginning of the second line. When I put two equal signs between the equaltions it breaks the line twice and the first equal sign ends up as a separate line. I suppose I could solve this problem by using equation instead of dmath and forcing line breaks but I like automatic line breaks. Is there any way to tell dmath to put the equal sign on both lines? (I also have the same problem with +, it appears only at the beginning of the second line.)

Best Answer

One possible solution which gives both automatic line breaking, and equals signs and line numbers precisely where you want them, and also allows pagebreaks (which dmath does not), is here:

Any way to check with a macro if an equation is too long to fit into a single line?

The macros I posted there can handle up to 8 equations linked by equals signs.