9

I'd like my subbibliography headings to be formatted as subsections with the book documentclass :

Here is an example :

\documentclass[12pt]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage[autostyle]{csquotes}

\usepackage[backend=biber,style=authoryear]{biblatex}
\addbibresource{example.bib}
\begin{document}

\nocite{*}
\printbibheading
\section*{First category}
\printbibliography[keyword=aaa, heading=subbibliography, title={Subsection1}]
\printbibliography[keyword=bbb, heading=subbibliography, title={Subsection2}]
\section*{Second category}
\printbibliography[keyword=ccc, heading=subbibliography, title={Subsection3}]
\printbibliography[keyword=ddd, heading=subbibliography, title={Subsection4}]
\printbibliography 
\end{document}

with example.bib :

@book{a,
  author       = {Doe, John},
  title        = {Super Book},
  date         = 2006,
  publisher        = {Publisher},
  keywords   = {aaa},
}

@book{b,
  author       = {Sponge, Bob},
  title        = {My Life},
  date         = 2006,
  publisher        = {Publisher},
  keywords   = {bbb},
}

@book{c,
  author       = {Doeee, John},
  title        = {Another Book},
  date         = 2006,
  publisher        = {Publisher},
  keywords   = {ccc},
}

@book{d,
  author       = {Doedoo, John},
  title        = {Book},
  date         = 2009,
  publisher        = {Publisher},
  keywords   = {ddd},
}

The result is :

enter image description here

The headings (called "Subsection 1", "Subsection 2", "Subsection 3", and "Subsection 4") are by default formatted as sections. How to change that?

1
  • 3
    Does \defbibheading{subsubbibliography}[\refname]{\subsection*{#1}} help? You then need heading=subsubbibliography of course.
    – moewe
    Sep 9, 2015 at 10:44

1 Answer 1

10

Adding

\defbibheading{subbibliography}[\refname]{\subsection*{#1}}

seems to do the trick.

3
  • Interestingly, for subbibliography the default in book-like classes is \refname and not \bibname, the latter is used for bibliography-like headings. But that does not matter here, the title is set manually anyway.
    – moewe
    Sep 9, 2015 at 10:46
  • @moewe Thanks, wasn't aware of that. I'll edit my answer. Sep 9, 2015 at 10:48
  • I had looked it up when I copied the definition, so I noticed the difference between your answer and my code. I don't think it matters a great deal.
    – moewe
    Sep 9, 2015 at 10:49

You must log in to answer this question.

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