Page Layout ⇒ Preventing page breaks during bibliography entries
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
Preventing page breaks during bibliography entries
LaTeX usually does a pretty good job of keeping short entries together on a page, but in this particular document I may actually need it to break the pages so as to keep the entries from being split across pages, even if doing so requires lots of white space at the end of a page.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Preventing page breaks during bibliography entries
A global solution would be to avoid widows and orphans by special settings in the preamble [1].
Code: Select all
\clubpenalty10000
\widowpenalty10000
A local solution would be to enlarge the concerned page by one or more lines.
Code: Select all
\enlargethispage{2\baselineskip}
[1] Widows and orphans - Wikipedia, the free encyclopedia
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
Re: Preventing page breaks during bibliography entries
In this case, the requirement is that NO entry (regardless of length) be split across a page. For example, say LaTeX wants to split one entry across the page with 10 lines on the first page and three on the second.
I've tinkered with the idea of putting every entry in the bibliography in its own \parbox, but this seems likely to cause problems with page breaks due to the penalty of both not breaking the parbox and not leaving lots of white space at the bottom of the page (the white space would be OK, the overrun of the parbox would not).
Preventing page breaks during bibliography entries
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
Re: Preventing page breaks during bibliography entries
The needspace package provides a partial solution by saying, to effect, "if there is 13\baselineskip [or however many lines that entry will need] of space available, put it here; otherwise, start a new page." It's essentially this feature that I'm looking for, but you'd have to know how many lines each entry is going to need to implement this globally.
I thank everyone for their speculation on this subject.