In my document, the page happens to break right after the line that introduces an example environment:
\documentclass{article}
\usepackage{gb4e}
\begin{document}
\noindent Here are my results:
\begin{exe}
\ex This is my first result.
\ex This is my second result.
\end{exe}
\end{document}
I tried to put Here are my results:\nobreak, as indicated in this answer, but that changed nothing for me. What should I do?
\makeatletter\@afterheading\makeatother. – Stephan Lehmke Dec 11 '12 at 20:24Here are my results:\makeatletter\@afterheading\makeatother, but that didn't work. – Sverre Dec 11 '12 at 20:25\goodbreakbefore the line "Here are my results:" that would encourage latex to push that line to the next page if it's within a line or two of the bottom of the page, and wouldn't do anything if there's more space than that. not a great approach, but better than a page forced by\newpage. (i didn't go intogb4e, but it's likely that surgery there would be necessary to permit something like\nobreakto be effective.) – barbara beeton Dec 11 '12 at 20:31\par \nobreak\makeatletter\@afterheading\makeatother. Sorry for groping in the dark, but your MWE has no page break ;-) – Stephan Lehmke Dec 11 '12 at 20:35\goodbreakworks fine. Stephan's latter approach works too, but it also removes the vertical space that's normally above theexeenvironment. – Sverre Dec 11 '12 at 20:40