Preventing page breaks from occurring in bibliography items
Typically bst
files provides definition for the various entry type where the first call is to the function output.bibitem
and the last on to the function fin.entry
. Thus to wrap whole \bibitem
s in minipage
we can add hooks to such functions. The code below illustrates the changes.
FUNCTION {output.bibitem}
{ newline$
"\begin{minipage}{\textwidth}" write$
newline$
"\bibitem[{" write$
label write$
")" make.full.names duplicate$ short.list =
{ pop$ }
{ * }
if$
"}]{" * write$
cite$ write$
"}" write$
newline$
""
before.all 'output.state :=
}
FUNCTION {fin.entry}
{ add.period$
write$
newline$
"\end{minipage}" write$
newline$
}
We introduced
newline$
"\begin{minipage}{\textwidth}" write$
at the begin of the function output.bibitem
and
"\end{minipage}" write$
newline$
at the end of the function fin.entry
.
One way to achieve (most of) your objective is to modify the thebibliography
environment to disallow typographic widows and orphans. By default, the "widow" and "orphan" (TeX's term: "club") penalty parameters are set to a value of 4000
in bibliography environments. By setting the corresponding parameters to 10000
(the maximum meaningful value for a TeX penalty parameter), you can essentially forbid "widows" and "orphans" from occurring. Incidentally, if you take this approach, I recommend also using the \raggedbottom
directive, as otherwise the whitespace between consecutive bib entries may become excessively large.
Note that this approach will prevent page breaks from occurring within bibliography items that span three or fewer lines. It will still permit an entry of four or more lines to be broken across pages -- as long as the first and second part each have at least two lines. This approach seems like a reasonable compromise between (i) wanting to keep the information of each bibliographic contained on one page and (ii) wanting to keep the heights of the text block reasonably uniform across columns and pages. Hopefully, most of your bib entries span three or fewer lines -- and will thus not be broken up anymore across pages and/or columns.
\documentclass{article}
\usepackage{etoolbox}
\patchcmd{\thebibliography}{\clubpenalty4000}{\clubpenalty10000}{}{}
\patchcmd{\thebibliography}{\widowpenalty4000}{\clubpenalty10000}{}{}
% rest of preamble
\begin{document}
% the document itself
\clearpage
\raggedbottom
\bibliography{<mybibfile(s)>}
\end{document}
The easiest way is to locally increase the interlinepenalty for your Bibliography by this commands:
\makeatletter
\interlinepenalty=10000
\bibliography{library}
\bibliographystyle{style.bst}
\makeatother