9

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:

enter image description here

and this:

enter image description here

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.

LaRiFaRi
  • 43,807
Adam
  • 4,684
  • 9
    The repetition of the symbol is used in Russian typography; it's not used in Western typography. Personally I find it useless and confusing. – egreg Apr 17 '14 at 21:11
  • Could you not break the line at =? That would seem easier to read to me. – cfr Apr 17 '14 at 21:12
  • It would be easier but my question is if there is any rule to make it compulsory. – Adam Apr 17 '14 at 21:22
  • Two minus signs in a row could be confused with a double negative. In the second example figure, the second minus is a unary minus (no space between it and j), so this definitely means "subtract -j\sin z" and so is wrong. If you are writing in a context where you know no one will be confused by this, at least put {} - j\sin z) on the second line so that the minus will be treated as a binary operation. – Dan Apr 17 '14 at 21:32
  • I don't quite follow what can I do. – Adam Apr 17 '14 at 22:13
  • Related questions: http://tex.stackexchange.com/questions/21161/breaking-formulas-before-and-after-binary-operators http://tex.stackexchange.com/questions/32012/beyond-bringhurst-mathematical-typesetting – Torbjørn T. Apr 17 '14 at 22:24
  • As to the question you ask in your edit, it should be noted that TeX will automatically insert viable points of fracture after binary operation and binary relation symbols, that can be exploited by the paragraph builder in the case of in-line math. So we could say that TeX automatically implements the rule according to which in-line equations should be broken after a “+” or “=”, without repeating the sign on the next line (it will insert the correct spacing, too). If you are interested in the details, I can write a longer answer. – GuM Jul 11 '16 at 18:27
  • @egreg, I partially agree that repeating the symbol is (I'd add often) useless, but what do you think about an equation split over a pagebreak? Wouldn't be useful that a + sign indicates that the equation/formula is not finished yet? Assuming that it is useful, I'd repeat the sign everytime I split, since I can't know whether or not the two lines will be on two pages. – Enlico Jun 29 '18 at 08:38
  • 1
    @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. – egreg Jun 29 '18 at 08:41
  • Oh, @egreg, I try to avoid long equations in general, so surely I'd avoid breaking them between pages as hard as I can; but the unlikely situation that I can't do much to move the long equation away from the pagebreak is still realistic. Are you saying that I should resort on sign repetion only in these specific situations? Or would you still reject the repetition? – Enlico Jun 29 '18 at 08:51
  • 1
    @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. – egreg Jun 29 '18 at 09:00
  • @egreg Repeating the symbol customary for the Oxford University Press at least into the 1950s. See p. 37 of their 1956 book "The Printing of Mathematics" describing their typesetting practices. – Ryan Kavanagh Mar 02 '21 at 03:57

2 Answers2

14

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.

LaRiFaRi
  • 43,807
  • 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 Apr 17 '14 at 22:15
  • @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 $$...$$ :-) – LaRiFaRi Apr 17 '14 at 22:21
  • 1
    If you are Russian or want to write for Russians: There seems to be a package for automatic double signs. http://tex.stackexchange.com/a/8346 – LaRiFaRi Apr 17 '14 at 22:36
  • 2
    There is nothing to add for displayed equations from my point of view. In inline math, however, it is recommended to break after the relation sign. In contrast to displayed equations, which are visible to the common reader “at once” and are therefore easy to overview, inline math is part of the text block, and therefore is read line-by-line, from left to right. With the equals (or operator in general) at the end of the line, the reader will know that there is something to come that belongs to the same equation after the line break. You may compare it to a hyphen. – Lupino Apr 18 '14 at 01:21
  • @Lupino You are absolutely right, but I would not recommend to set such long formulae inside the text.You will have to break them manually and lose flexibility. And it is hard to read. But if you have to, your "hyphenation"-style makes sense. – LaRiFaRi Apr 18 '14 at 09:58
  • 1
    A useful write-up! I've taken the liberty of converting some of your expressions into more idiomatic English. – Mico Dec 01 '14 at 08:54
1

See the American Mathematical Society guide to good typesetting on where to break equations. https://www.ams.org/publications/authors/mit-2.pdf

Em D
  • 61
  • 1
  • 4