You can inhibit page breaks in the middle of paragraphs by saying in you preamble
\widowpenalties 1 10000
\raggedbottom
Without \raggedbottom (that the article class does automatically) the pages would be awful.
The primitive \widowpenalties is an extension to the original TeX program, present in e-TeX based engines (pdftex, xetex and luatex). It generalizes the \widowpenalty parameter of TeX, which contains the penalty inserted before the last line of a paragraph to help controlling widow lines.
The general syntax of \widowpenalties is
\widowpenalties n p1 p2 ... pn
where n is a non-negative integer and p1, p2, ..., pn are the values of the penalties inserted before the various lines of a paragraph starting from the bottom. If the paragraph has more than n+1 lines, the last value is repeated. So the following settings are equivalent
\widowpenalty 1000
\widowpenalties 2 1000 0
If one wants to reset the array to zero (and TeX will use the standard parameter \widowpenalty), it's sufficient to say
\widowpenalties 0
or set the array in a group, of course. It follows from the stated rules that
\widowpenalties 1 10000
will insert a penalty of 10000 (no break) between all lines in every paragraph, thus prohibiting mid-paragraph page breaks.
The array \clubpenalties is similar, but it works from the top of the paragraph down. So an alternative solution is
\clubpenalties 1 10000
Of course, as lockstep points out, there's a "pure TeX" solution:
\interlinepenalty 10000
but \widowpenalties is more powerful than this. For example, if we need to break a paragraph before the third line from the bottom, we can say
... here the paragraph ends.
{\widowpenalties 4 10000 10000 -10000 0 \brokenpenalty 0 \par}
which is easier than the TeX method of putting \vadjust{\break} somewhere in the line that precedes the desired break; \brokenpenalty 0 is needed because otherwise the penalty inserted would be greater than -10000.
Since TeX uses the parameter values which are current at the moment a \par is sensed, it will use the stated ones, resetting them at group end. The group is (almost) necessary, because the setting of \widowpenalties is permanent, that is not like \hangindent, \hangafter or \parshape that are automatically reset as part of the action of \par.
Notes
TeX always uses the values of the parameters that are current at the time of \par for deciding how to break the paragraph into lines and creating the vertical list to be fed to the "recent contributions", no matter how many times they are changed during the paragraph itself: \leftskip, \rightskip, \hangindent, \hangafter, \parshape, \pretolerance, \tolerance, \emergencystretch (and probably others, there are so many). After it has decided the line breaks, it assesses interline penalties and demerits to be transferred to the enclosing vertical list and contributes the boxes it has built inserting also the interline glue based on the values of \baselineskip, \lineskip and \lineskiplimits (also these are among the "unique value" parameters).
Thus one can change the applicable value of, say, \widowpenalties at the start, in the middle or just before the end of the paragraph and only the last setting will be taken into account. One might solve the "break before the third to last line" by setting \widowpenalties at the beginning, enclosing the whole paragraph in a group. But the trick of setting it in a group avoids this need. It has some "pros and cons": the pros are that we don't need to reset the changed values; the cons are that \hangindent, \hangafter and \parshape are not effectively reset, because the end of the group annihilates the resetting done by \par! This may be a problem in a LaTeX list which uses \parshape; it may be also a problem in some special places where LaTeX redefines \par in such a way that it redefines itself to a "normal \par".
`to mark your inline code as I did in my edit. – egreg Jun 30 '11 at 13:34\nopagebreakis to avoid a page break in the current line, i.e. the line it is used in. It has no global effect. – Martin Scharrer♦ Jun 30 '11 at 15:50