# Vertical spacing before and after equation environment: empty line or not?

The vertical spacing in front of and behind the amsmath equation environment is different whether I insert a blank line or not (im using KOMA-Script with parskip=half if this is important). I'd like to insert a blank line so that my code is more readable, but then the vertical space is rather big:

Some text here

$$a = b$$

Some other text


Way two (no blank line)

Some text here
$$a = b$$
Some other text


Way three (blank line only at the bottom, this looks very good, IMHO, but I think the spacing is asymmetric then):

Some text here
$$a = b$$

Some other text


I know I could fix the code readbility with commenting the blank lines

Some text here
%
$$a = b$$
%
Some other text


But my question is: Are there some typographical (thumb) rules, guidelines, do's or dont's or whatever, on how to space the equation environment?

-
– hpesoj626 Oct 16 '12 at 11:23
Method (1) is simply wrong: a displayed equation should never start a paragraph. If it ends a paragraph, leave a blank line after it (case 3); if not, no blank line (case 2). – egreg Oct 16 '12 at 11:37
Thanks. So, should I always comment empty lines that are no paragraph if I want the emtpy line for better code readability (case 4)? – Foo Bar Oct 16 '12 at 13:15
Yes, the same is also true (for slightly different reasons) for all latex display environments such as enumerate etc. In those case it it isn't always wrong to have a blank line above but the layout is different if you do, so it's wrong to use blank lines in the source for cosmetic reasons if they are not intended to mean \par – David Carlisle Oct 16 '12 at 16:21

## 1 Answer

Your method (1) is simply wrong: a displayed equation should never start a paragraph.

If it ends a paragraph, leave a blank line after it (case 3); if the paragraphs continues, no blank line (case 2).

Setting a nonzero parskip does not increase readability, in my opinion (which I share with people like Tschichold): it just puts big white stripes on the page, spoiling its uniform grey color.

-
I accepted this answer, but another comment about the parskip: I think the parskip is something "localized". Allmost all german books I have use a skip on a paragraph while almost all english books I have don't. And all my documents are intended for german readers, so I think a parskip feels more "natural" to them. – Foo Bar Jan 6 '13 at 10:31