6

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 ?

Relam
  • 77
  • \parskip=0pt plus 1fil – John Kormylo Mar 08 '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 08 '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 08 '16 at 20:36
  • i have the same problem can any one provide a clear answer or command to add? – Cfun Mar 09 '16 at 19:45
  • There's a mistake in the patch of \widowpenalty. Can you spot it? – Mico Mar 09 '16 at 20:19

1 Answers1

11

You might try

\usepackage{etoolbox}
\AtBeginEnvironment{thebibliography}{\interlinepenalty=10000}

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.

Mico
  • 506,678
  • 1
    It works for me, what's good is that it only affect thebibliography environment, thanks. – Cfun Mar 09 '16 at 20:35
  • 1
    Works for me as well! Bibliography looks much better now. Thanks for your help! – Relam Mar 11 '16 at 04:05