[Tex/LaTex] Preventing page break at specific location

page-breaking

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:
Output of the above LaTeX code

Best Answer

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
Related Question