# Typesetting mathematical formulas in line breaking

When you typeset a mathematical formula is there a rule regarding the breaking of the formula in a new line, meaning if for instanse the formula breaks in a plus sign (+) or in a equal sign (=) then you must insert it in the new line also or is it enough if it is only in the previous line?

Is there a rule, for example, between this:

and this:

Edit I

As I understand from what has been written in my post I see that there are indeed some "rules" that must be used to produce a correct mathematical formula. Is there a way so the output to be produced automatically correct? If not it seems that it is quite a hard job to produce correct mathematical formulas.

• The repetition of the symbol is used in Russian typography; it's not used in Western typography. Personally I find it useless and confusing. Apr 17, 2014 at 21:11
• Could you not break the line at `=`? That would seem easier to read to me.
– cfr
Apr 17, 2014 at 21:12
• It would be easier but my question is if there is any rule to make it compulsory.
Apr 17, 2014 at 21:22
• @EnricoMariaDeAngelis A single equation should never be split across pages at “continuation lines”. `amsmath` has `\allowdisplaybreaks` to help during the writing of a document, but in the final version it should be disabled and `\displaybreak` manually and carefully added where necessary. Jun 29, 2018 at 8:41
• @EnricoMariaDeAngelis I've seen examples of long formulas that are split wherever possible (CAS systems make it possible to produce as long formulas as you like). I'd be consistent in every case. Jun 29, 2018 at 9:00

I have never seen any rules on this, but both of your examples are quite hard to read. I will just point out some thoughts about readability:

• a minus followed by a minus could be understood as a plus. When reading the whole formula (and not being used to such repetition like in Russia, as pointed out by egreg), I would read j sin z minus minus j sin z which makes me need to read it again.

• it seems to be common style to set the sign in the next line. Your first example looks like a broken first line and a new equation on the second line. As the sign belongs to the term following, I would leave the sign always stuck to the right side term

• In school and later in university I learned: "always put just one equal-sign on one line". I think that's a good rule to keep short formula lines and a nice aligning. (For sure, you know all the environments to do this)

As a reference I only found the German standard DIN 1338 from march 2011, which is the current standard at present. Concerning the breaking of formulae in case the lines are too long, they write:

• if more than one `=` symbol is used in the formula, it shall be broken before this symbol. The equal symbols shall be set at the beginning of each line and aligned below the first `=` symbol.

• long terms get broken before a `+` or `-` symbol. If possible, not inside of brackets (parentheses). The sign is set at the beginning of the new line but more to the right than the prior `=` symbol.

• If a product must be split, the multiplication dot is set at the beginning of the new line but more to the right than the prior `=` symbol. If one of the factors consists of a big sum or difference, the previous rule (breaking sums) can be considered

• Roots shall be written in power notation and broken as mentioned in the two previous rules. The same for fractions. The denominator shall be written as factor with negative power and broken like in rules 2 or 3

• Units always have to stick to their value. (Using the `siunitx` package will prevent this type or error automatically)

On my earlier comment regarding the "one equal symbol per line": DIN 1338 and DIN EN ISO 80000-1 do not write a word about this topic, but they use multiple `=` symbols quite often. So this "rule" can already be revised.

• When I write mathematical formulas do I have to fix it by myself or is there a way to produce automatically the best output? If the first one is the case then writing math correctly is a quite difficult task.
• @Adam Until now, I have not seen anything doing this automatically. Setting formulae is a difficult and tedious thing. The typesetting depends a lot on how the reader should understand the formula and thus, you have to do manual work to set each case right. Costs time and money. That's, b.t.w., the reason why Knuth named the equations-command `\$\$...\$\$` :-) Apr 17, 2014 at 22:21