如何使用 bibsep(natbib 包)避免参考书目中的分页符?

如何使用 bibsep(natbib 包)避免参考书目中的分页符?

bibsep当从包中使用时,如何避免参考书目中的分页符natbib?事实上,似乎只有当我bibsep使用定义时才会发生分页setlenght

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage[numbers,sort&compress]{natbib} % To create fancy citations from bibliography
   \setlength\bibsep{0.5\baselineskip} % vertical space between each item
\bibliographystyle{abbrvnat}

\begin{document}
\section{Introduction}
\newpage

\nocite{*} % adds all entries in the bib file to the bibliography
\bibliography{biblio} % compile with bibtex
\end{document}

这给我

在此处输入图片描述

在此处输入图片描述

当我不使用它时,就不会发生这种情况。

答案1

您可以将所有联程罚款设置为 10000:

\begin{filecontents*}{\jobname.bib}
@article{a,
  author={A. Aaa},
  title={\lipsum*[2-3]},
  journal={Journal},
  year=2001,
}
@article{b,
  author={B. Bbb},
  title={\lipsum*[2-3]},
  journal={Journal},
  year=2002,
}
@article{c,
  author={C. Ccc},
  title={\lipsum*[2-3]},
  journal={Journal},
  year=2003,
}
@article{d,
  author={D. Ddd},
  title={\lipsum*[2-3]},
  journal={Journal},
  year=2004,
}
@article{e,
  author={e. Eee},
  title={\lipsum*[2-3]},
  journal={Journal},
  year=2005,
}
@article{f,
  author={F. Fff},
  title={\lipsum*[2-3]},
  journal={Journal},
  year=2006,
}
@article{g,
  author={G. Ggg},
  title={\lipsum*[2-3]},
  journal={Journal},
  year=2007,
}
@article{h,
  author={H. Hhh},
  title={\lipsum*[2-3]},
  journal={Journal},
  year=2008,
}
@article{i,
  author={I. Iii},
  title={\lipsum*[2-3]},
  journal={Journal},
  year=2009,
}
@article{j,
  author={J. Jjj},
  title={\lipsum*[2-3]},
  journal={Journal},
  year=2010,
}
@article{k,
  author={K. Kkk},
  title={\lipsum*[2-3]},
  journal={Journal},
  year=2011,
}
@article{l,
  author={L. Lll},
  title={\lipsum*[2-3]},
  journal={Journal},
  year=2012,
}
@article{m,
  author={M. Mmm},
  title={\lipsum*[2-3]},
  journal={Journal},
  year=2013,
}
\end{filecontents*}

\documentclass{article}
%\usepackage[utf8]{inputenc}

\usepackage[numbers,sort&compress]{natbib} % To create fancy citations from bibliography
\usepackage{etoolbox}
\usepackage{lipsum}

\setlength\bibsep{0.5\baselineskip} % vertical space between each item
\bibliographystyle{abbrvnat}

\patchcmd{\thebibliography}
  {\clubpenalty 4000\widowpenalty 4000}
  {\clubpenalties 1 10000 \widowpenalties 1 10000 }
  {}{}


\begin{document}
\section{Introduction}
\newpage

\nocite{*} % adds all entries in the bib file to the bibliography

\bibliography{\jobname} % compile with bibtex
\end{document}

答案2

使用

\usepackage[sectionbib]{natbib}

相关内容