# How to prevent the last bibliography entry from being split in a new page?

I'm currently facing the problem that when the last bibliography entry on a page is too long to fit in the remaining space, it's being split in two parts (in the current and the next page).

\documentclass[12pt,a4paper,oldfontcommands,oneside]{memoir}
\usepackage[nosectionbib]{apacite}
\begin{document}

\clearpage
\bibliographystyle{apacite}
\bibliography{References}
\end{document}


I already tried the following, which was suggested in the posting Preventing page breaks from occurring in bibliography items, but it doesn't affect the page breaks for long bib entries.

\usepackage{etoolbox}
\patchcmd{\thebibliography}{\clubpenalty4000}{\clubpenalty10000}{}{}
\patchcmd{\thebibliography}{\widowpenalty4000}{\clubpenalty10000}{}{}


How to prevent the last bibliography entry on a page from being split in a new page ?

• \parskip=0pt plus 1fil – John Kormylo Mar 8 '16 at 14:53
• Its works, thanks! But now the declaration of academic honesty, which follows after the references, is spaced wrong (huge break between chapter title and text – Relam Mar 8 '16 at 15:21
• Reset \parskip back to original value (usually 0pt, but check using \the\parskip) after the bibiliography. This really only works when you have lots of small paragraphs. You may need a \vfill\null at the end as well. – John Kormylo Mar 8 '16 at 20:36
• i have the same problem can any one provide a clear answer or command to add? – SAM Mar 9 '16 at 19:45
• There's a mistake in the patch of \widowpenalty. Can you spot it? – Mico Mar 9 '16 at 20:19

\usepackage{etoolbox}

Setting the parameters \clubpenalty and \widowpenalty to 10000 (the practical equivalent of infinity...) will prevent typographic "orphans" ("clubs" in TeX jargon) and "widows". However, if an entry is four or more lines long, these penalties will not disallow a page break after the first two lines and/or the final two lines of the typeset entry. Hence the suggestion to reset \interlinepenalty.