This is a continuation of my previous question. I have the following line of code in my preamble

\pretocmd{\section}{\ifnum\value{section}=0 \else\clearpage\fi}{}{}

which puts each section on a new page except for the very first section of a chapter. My problem is that if I use something like

 keyword={books on things},
 title={Books on Things}
 notkeyword={books on things},
 title={Everything Else}

in the document body, then the bibliography title and the bibliography sections are also placed on 3 different pages, whereas I want them to stay together. My question is thus

Is there a way to modify the aforementioned code of line in such a way that it does not apply to the bibliography (or some such workaround)?


1 Answer 1


You can use the following in your preamble:

\pretocmd{\section}{\ifinbib\else\ifnum\value{section}=0 \else\clearpage\fi\fi}{}{}

It provides a new conditional \ifinbib (false by default) which is set to true as soon as you \printbibheading. After this, the conditional for \clearpage is never called.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .