25

I only know that we have to make at least one blank line between two adjacent paragraphs.

My question is:

What is the proper way to make use of a blank line ?

For example:

  1. Is it recommended to make a blank line between heading command call, e.g. \chapter{}, and the first text content as follows?

    \chapter{Introduction}
    
    In this chapter we ....
    

    or

    ... that is proven true.
    
    \chapter{Limit}
    
  2. Is it recommended to make a blank line between two consecutive display equations as follows?

    \[ \sin x \] 
    
    \[ \cos x \]
    
  3. Is it recommended to make a blank line between a sentence and a display equation as follows?

    Assume we have
    
    \[
      \cos x
    \]
    

    or

    \[
      \cos x
    \]
    
    that satisfies ...
    
  4. etc...


Edit 1:

  1. How about \bigskip, \vspace{}? Does each of them needs one blank line before and one blank line after as follows:

    Yes. This is a book.
    
    \bigskip
    
    Commander, please open the silo!
    

    or

    Yes. This is a book.
    
    \vspace{1km}
    
    Commander, please open the silo!
    
7
  • @Joseph, a pair of back-tiks cannot span multiple lines I think. Dec 28, 2010 at 10:18
  • See also the explanation in tex.stackexchange.com/questions/565/…
    – Caramdir
    Dec 28, 2010 at 11:05
  • 1
    Oops, I accidentally left the following comment on Hendrik's answer instead of the question. Hendrik has the right answer, I think. I'd only point out (and this doesn't deserve its own answer) that a blank line after \chapter doesn't matter. It will display the same. In the other cases, starting a new paragraph (by using a blank line) will have an effect.
    – TH.
    Dec 28, 2010 at 11:12
  • 1
    @xport: for source code in lists, you need to indent the code by an additional four spaces. I’ve changed the text for you. If you don’t like how this renders, you can roll the change back. One thing that is still wrong about this posting is that two empty lines are inserted in the code, in place of just one. This appears to be a bug, and I’m reporting it on meta. Dec 28, 2010 at 11:13
  • 1
    @xport: only in comments (markup in comments is amputated, don’t rely on it too much). In the actual question/answer text, the same code works. Dec 28, 2010 at 13:59

3 Answers 3

20

I can tell you what I'd do in these 3 cases:

1.: After \chapter{} and similar command I'd always use a blank line as it makes the document structure clearer. Moreover, "In this chapter ..." is the start of a paragraph.

2.: I wouldn't use a blank line here if both displays belong to the same paragraph. However, I usually wouldn't use two consecutive displays at all; I'd use align* or gather* instead.

3.: In that particular case don't use blank lines as everything is within one paragraph. Speaking of clarity of the document structure, I'd say that

Assume we have    
\[
  \cos x
\]
that satisfies ...

is clear enough. Only use a blank line after the display if the paragraph ends after the display.

4.: As for your extra question about vertical spacing commands: In the context you provide, I'd always surround them with blank lines for clarity of the document structure. I sometimes use them before a display like this; then you mustn't put a blank line:

... some text
\vspace{-1ex}
\[
  ...
\]

I should point out that manual corrections like in this last example are rarely needed, and you should only use them if you're sure that you know what you're doing.

19
  • 4
    In 3 also the blank lines produces bad spacing.
    – Caramdir
    Dec 28, 2010 at 11:06
  • @Hendrik, thanks for almost complete answer. One more case has been added above regarding \bigskip and vspace. Dec 28, 2010 at 13:53
  • @Hendrik: no4 looks wrong for correct typesetting with TeX. because the lengths abovedisplayskip and abovedisplayshortskip should only be used here.
    – user2478
    Dec 29, 2010 at 7:17
  • @Herbert: I tried to word it carefully: Note the "sometimes". I do know about the displayskips, but sometimes they don't work out nicely for me, so I put manual corrections. The situation in no.4 happens, e.g., if there's a lonely integral sign in my display and the overlap is just too small for the shortskip. I know that I must only do stuff like that in the very end. Dec 29, 2010 at 7:22
  • @Hendrik: please give an example
    – user2478
    Dec 29, 2010 at 7:41
5

it gives wrong vertical spacing, when you use blank lines before, between and after display math environments. Compare the following output, where the equation environment has not the same spacing over and under the math expression.

\documentclass{article}
\begin{document}

\begin{minipage}{0.49\linewidth}
The line above the equation.

\[ f(x)=\prod_{i=1}^n\left(i-\frac{1}{2i}\right) \]

The line below the equation.
\end{minipage}\hfill\begin{minipage}{0.49\linewidth}
The line above the equation.

\begin{equation} 
f(x)=\prod_{i=1}^{n}\left(i-\frac{1}{2i}\right) 
\end{equation}

The line below the equation.
\end{minipage}

\bigskip
\begin{minipage}{0.49\linewidth}
The line above the equation.
%
\[ f(x)=\prod_{i=1}^n\left(i-\frac{1}{2i}\right) \]
%
The line below the equation.
\end{minipage}\hfill\begin{minipage}{0.49\linewidth}
The line above the equation.
%
\begin{equation} 
f(x)=\prod_{i=1}^{n}\left(i-\frac{1}{2i}\right) 
\end{equation}
%
The line below the equation.
\end{minipage}
\end{document}
1
  • thanks for your answer. From this I know that blanks lines before and/or after display equation (either \ [...\ ] or \begin{equation}...\end{equation}) will produce different spacing on the output. Dec 28, 2010 at 13:44
2

For your new part 4, the answer is it doesn't matter. \bigskip expands to \vspace\bigskipamount and \vspace contains code that deals with it be used in horizontal mode (namely, it inserts the \vskip into the surrounding vertical list after the current line using \vadjust).

You must log in to answer this question.

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