# Preventing page break at specific location

I am currently compiling a booklet of presentation abstracts. Each entry has a title (which I render as a \section*), an author, and the abstract text itself.

For some of the entires, LaTeX decides to break the page between the author and the abstract text, which is visually unpleasing. I want to avoid this and have breaks only between entries and within the abstract text itself.

I tried to solve this by putting \nopagebreak wherever I can, but to no avail. Putting each entry in a ‘samepage’ environment is also problematic because then LaTeX would not break within the abstract texts anymore.

How can I fix this?

My current approach is this:

\section*{Towards a Unified Theory on Brontosauruses}\nopagebreak
\vspace{-0.35em}\noindent{\large Anne Elk}\\[0.7em]\nopagebreak
\nopagebreak All brontosauruses are thin at one end, much, much thicker
in the middle, and then thin again at the far end. […]

\vspace{0.8em}


It leads to the following output:

• +1 for the M. Python reference. See the needspace package, in which \Needspace{length} can be issued before the \section* to indicate a page break if there isn't at least length left on the page. Sep 2 '15 at 14:47

You should use \\*:

\documentclass{article}

\usepackage{lipsum}

\setcounter{secnumdepth}{-2} % no section is numbered

\begin{document}

line\par
line\par
line\par
line\par
line\par
\lipsum[1-4]

\section{Towards a Unified Theory on Brontosauruses}
\vspace{-0.35em}
\noindent{\large Anne Elk}\\*[0.7em]
All brontosauruses are thin at one end, much, much thicker
in the middle, and then thin again at the far end.

\vspace{0.8em}

\lipsum[3]

\end{document}


If you comment the first line, the first line of the abstract will be typeset in the first page.

Maybe you want to define an environment:

\newenvironment{conferenceabstract}[2]
{\section{#1}\vspace{-0.35em}\noindent{\large #1}\\*[0.7em]}
{\par\vspace{0.8cm}}


and input the thing as

\begin{conferenceabstract}
{Towards a Unified Theory on Brontosauruses}
{Anne Elk}
All brontosauruses are thin at one end, much, much thicker
in the middle, and then thin again at the far end.
\end{conferenceabstract}

The full text follows

• Interesting. I have no idea why \\* works and \\\nopagebreak does not, but I'm not going to complain. I ended up combining your approach with the \needspace suggested above. Cheers! Sep 2 '15 at 15:18