14

I use the options

\renewcommand{\baselinestretch}{1.25}
\setlength{\parskip}{0pt}
\setlength{\parindent}{0pt} 

in the preamble of my document and most of the time the document looks like intended. Once in a while though, especially when I use multiline-equations, I get huge spaces right before and after the equation and the surrounding text, for example:

enter image description here

Is there any way I can avoid that without removing the \parskip option?

TriSSSe
  • 449
  • 7
    Do you have a blank line before and after the equation? If so, remove it (see also http://tex.stackexchange.com/questions/565/how-can-i-get-rid-of-indentation-after-an-equation/567#567). – Caramdir Jun 27 '11 at 09:21
  • 5
    Also, this might be a problem with the page breaking. Do you have some big unbreakable block (e.g. a multiline equation) at (or near) the top of the following page)? If so, you could try if you like typesetting with \raggedbottom better. – Caramdir Jun 27 '11 at 09:25
  • Yes you are correct: the problem was caused by a big unbreakable block on the next page. I also didn't know about the \raggedbottom option. Thanks! – TriSSSe Jun 27 '11 at 14:47

4 Answers4

13

This might be a problem with the page breaking. Do you have some big unbreakable block (e.g. a multi-line equation) at (or near) the top of the following page)? If so, you could try to allow pagebreaks in that equation, convert the unbreakable block to a float, or maybe use \raggedbottom (which tells LaTeX not to ensure that every page has the same height).

Caramdir
  • 89,023
  • 26
  • 255
  • 291
  • Thanks! Is it possible to limit the range of \raggedbottom option to a particular page, such that LaTeX only assumes a different height for the page with the above equation? – TriSSSe Jun 27 '11 at 20:57
  • @Christian: I don't know. Best ask a new question. – Caramdir Jun 27 '11 at 22:22
  • 2
    @Christian, you could do it by using the afterpage package, and defining \def\oneraggedpage{\raggedbottom\afterpage{\flushbottom}}. @Caramdir is right; this belongs as its own question, though, since it's independently useful. – Ben Lerner Jun 29 '11 at 20:24
8

The spacing above and below math blocks is also controlled by \abovedisplayskip/\belowdisplayskip and \abovedisplayshortskip/\belowdisplayshortskip. Being skips, they can have some amount of stretch, which sometimes explains the (to my eye) surprising gaps between text paragraphs and math --- there's extra vertical stretchability that I didn't expect. Also, since the above and below versions may not be equal, they may stretch differently, leading to asymmetric spaces around the math.

In my current thesis style file, the default values are set at

Above:     10.0pt plus 2.0pt minus 5.0pt, 
Aboveshort: 0.0pt plus 3.0pt, 
Below:     10.0pt plus 2.0pt minus 5.0pt, 
Belowshort: 6.0pt plus 3.0pt minus 3.0pt

(Note that Aboveshort != Belowshort; I have no idea why this is typographically right...) I don't quite understand when the "short" versions are used instead of the full versions, but I have found that always setting both pairs in tandem works well for me.

Ben Lerner
  • 7,082
2

Try \vspace{<dist>} with <dist> a negative value, right before the equation. Maybe not very elegant, but works with almost everything, figures, tables, you name it.

Count Zero
  • 17,424
1

One can also try \allowdisplaybreaks

N.N.
  • 36,163
shvr
  • 11