Biblatex with multiple bibliographies on documentclass book

I'm writing a book-like document, for which I need to use the LaTeX documentclass book (I'm using chapters, etc.). At the end of the document I want a unique bibliography, broken in several themes, just like this:

I've produced the following minimal working example:

\documentclass{article}
\usepackage[backend=biber,style=alphabetic]{biblatex}

\begin{document}

\section{Introduction}

Notes for logic and the theory of computation.

\nocite{Ben12}\nocite{GJ79}\nocite{Gor16}\nocite{HMU06}
\nocite{HR04}\nocite{Sip12}

\section*{Bibliography}

\vspace{5mm}

\printbibliography[keyword=Logic, title={\normalsize\normalfont Logic:}]
\printbibliography[keyword=Computation,
title={\normalsize\normalfont Theory of Computation:}]

\end{document}


which does exactly what I want when the documentclass is article. The entries of the .bib file are the following:

@BOOK{Ben12,
AUTHOR="M. Ben-Ari",
TITLE="Mathematical Logic for Computer Science",
PUBLISHER="Springer",
EDITION="3rd edition",
keywords="Logic",
YEAR={2012}                                 }

@BOOK{GJ79,
AUTHOR="M. R. Garey and D. S. Johnson",
TITLE="Computers and Intractability: a Guide to the Theory of {NP}-Completeness",
PUBLISHER="W. H. Freeman \& Co.",
keywords="Computation",
YEAR={1979}                                 }

@BOOK{Gor16,
AUTHOR="V. Goranko",
TITLE="Logic as a Tool: A Guide to Formal Logical Reasoning",
PUBLISHER="Wiley",
keywords="Logic",
YEAR={2016}                                 }

@BOOK{HMU06,
AUTHOR="J. E. Hopcroft and R. Motwani and J. D. Ullman",
TITLE="Introduction to Automata Theory, Languages, and Computation",
EDITION="3rd edition",
keywords="Computation",
YEAR={2006}                                 }

@BOOK{HR04,
AUTHOR="M. Huth and M. Ryan",
TITLE="Logic in Computer Science: Modelling and Reasoning about Systems",
PUBLISHER="Cambridge University Press",
EDITION="2nd edition",
keywords="Logic",
YEAR={2004}                                 }

@BOOK{Sip12,
AUTHOR="M. Sipser",
TITLE="Introduction to the Theory of Computation",
PUBLISHER="Cengage Learning",
keywords="Computation",
EDITION="3rd edition",
YEAR={2012}                                 }


However, as soon as I change the documentclass to book and the \section commands to \chapter, I run into trouble: the header "Bibliography" appears alone in a page, followed by an empty page, followed by a page only with the "Logic" entries, then followed by another empty page, followed by a page only with the "Theory of Computation" entries.

How can I manage to get in the documentclass book a similar formatting for the bibliography as the one I get when the documentclass is article?

• It would be slightly easier to reproduce what you are seeing if you could include all necessary .bib entries from the example (maybe reduce the number to two or four, to keep things shorter)... Right now I have to make up additional entries myself to get things working. – moewe Apr 18 '19 at 11:32
• I've just included all the .bib entries I used. – Daniel Apr 18 '19 at 13:03

Don't put formatting commands into the title key. It should only contain the title text. Any additional formatting should be performed via bibliography headings. You can use a particluar heading style with the heading option and define a new one with \defbibheading.

\documentclass{book}
\usepackage[backend=biber,style=alphabetic]{biblatex}

\begin{document}
\nocite{aristotle:anima,aristotle:physics,nussbaum}

\end{document}


seems natural, where subbibliography is a predefined heading that uses a sectioning command one level below the normal bibliography heading (for the book class bibliography uses \chapter* and subbibliography uses \section*).

\documentclass{book}
\usepackage[backend=biber,style=alphabetic]{biblatex}