I'm just starting to learn LaTeX. I tried typing


(math goes here)


and I got a whole bunch of errors. It seems LaTeX interpreted the empty line as the equation: when it saw nothing there, I guess it just ended math mode? It then said my other commands needed $'s so I assume that's what happened. When I typed

(math goes here)

everything was fine. So I'm confused. If LaTeX sees an empty line in an environment, does it just interpret this as me changing my mind, and deciding not to use the declared environment?

  • 3
    Blank lines are disallowed in math mode.
    – egreg
    Feb 26, 2015 at 21:27
  • 5
    a blank line is understood by tex as indicating a paragraph break. and math mode isn't allowed to continue across multiple paragraphs. hence a blank line within a math environment is reported as an error. Feb 26, 2015 at 21:27
  • Related: When should we use a blank line?
    – Werner
    Feb 26, 2015 at 21:50
  • Possible duplicate: Blank lines in align environment
    – Werner
    Feb 26, 2015 at 21:51

1 Answer 1


An empty line in TeX should never be used just to arrange the source. It is an instruction exactly the same as the command \par which ends a paragraph and starts TeX's line breaking algorithm to split a paragraph into lines.

So it is not allowed in display math and it should never be used on the line before display math either, in that position it does not generate an error but forces TeX to take recovery action that produces a spurious white paragraph on the line above the display.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .