# Avoid page break between paragraphs

This script:

\documentclass{report}
\usepackage{lipsum}
\begin{document}
\lipsum[1-5]
Examples:
\\\nopagebreak
example 1\\
example 2\\
example 3
\end{document}


unfortunately introduces an awkward page break between "Examples:" and "example 1":

I attempt to tackle the problem by using \nopagebreak however, my solution doesn't work. How to fix?

• the \nopagebreak in that position is preventing a break between example1 and example2, but you should not need such a command in-document. – David Carlisle Apr 6 '19 at 18:36

That is not "between paragraphs" that is a single paragraph (\\ never ends a paragraph).
Do not use \\ and use a section heading like \section*{Examples} latex does not allow page breaks after a section heading
• \section does not seem right here as it has a specific formatting and goes to TOC. Can I use \par instead of \? – Viesturs Apr 6 '19 at 18:18
• \section* doesn't go in the toc by default and has user or class defined formatting so you can make it use whatever format you want. You almost never need to use \par in a document as it is a simpler (and equivalent) to simply leave a blank line. – David Carlisle Apr 6 '19 at 18:20
• \section* does not go to the ToC. – Peter Wilson Apr 6 '19 at 18:20