TransWikia.com

Bibliography with Multiple Sections

TeX - LaTeX Asked on January 23, 2021

I will try to explain what I want: I would like my bibliography to be divided in 2 big categories: first, the Primary Sources (which will only contain a few items) and then the Secondary Sources. The Secondary Sources section will be divided in multiple subsections, based on themes. I would like for there not to be a page break between my "Primary Sources" section and my "Secondary Sources" section. I have tried a few solutions given here but they have not worked. How can I get them both to appear on the same page? Thank you for your help.

documentclass[12pt,a4paper,oneside,openany]{memoir}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage[style=mla,showmedium=false]{biblatex}
begin{filecontents}{test.bib}
@inreference{University2010,
  title = {University, n.},
  booktitle = {{{OED Online}}},
  date = {2010},
  edition = {Third Edition},
  publisher = {{Oxford University Press}},
  urldate = {2020-06-25},
  keywords = {dico,secondary}
}
@book{byattPossessionRomance2009,
  title = {Possession: A {{Romance}}},
  shorttitle = {Possession},
  author = {Byatt, A. S.},
  date = {2009},
  publisher = {{Vintage Classics}},
  location = {{London}},
  isbn = {978-0-09-950392-7},
  keywords = {primary},
  langid = {english},
  pagetotal = {511}
}
end{filecontents}
addbibresource{test.bib}
begin{document}
nocite{*}

printbibliography[keyword=primary,title=Primary Sources]

chapter*{Secondary Sources}
addcontentsline{toc}{chapter}{Secondary Sources}
printbibliography[heading=subbibliography,keyword=dico,title=Dictionary Entries]
end{document}

One Answer

In your document class chapter and chapter* start a new (double)page, so I'd not use chapter* for the 'Secondary Sources' heading.

I'd probably go with the following. This uses three levels of bibliography headings.

  1. One overall heading.
  2. The Primary/Secondary heading.
  3. The keyword headings.

Then

documentclass[12pt,a4paper,oneside,openany]{memoir}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage[style=mla,showmedium=false]{biblatex}

defbibheading{subsubbibintoc}[refname]{%
  subsection*{#1}%
  phantomsection
  addcontentsline{toc}{subsection}{#1}}

begin{filecontents}{jobname.bib}
@inreference{University2010,
  title = {University, n.},
  booktitle = {{{OED Online}}},
  date = {2010},
  edition = {Third Edition},
  publisher = {{Oxford University Press}},
  urldate = {2020-06-25},
  keywords = {dico,secondary}
}
@book{byattPossessionRomance2009,
  title = {Possession: A {{Romance}}},
  shorttitle = {Possession},
  author = {Byatt, A. S.},
  date = {2009},
  publisher = {{Vintage Classics}},
  location = {{London}},
  isbn = {978-0-09-950392-7},
  keywords = {primary},
  langid = {english},
  pagetotal = {511}
}
end{filecontents}
addbibresource{jobname.bib}
begin{document}
nocite{*}

printbibheading[heading=bibintoc]
printbibliography[heading=subbibintoc, keyword=primary,title=Primary Sources]
printbibheading[heading=subbibintoc,title=Secondary Sources]
printbibliography[heading=subsubbibintoc,keyword=dico,title=Dictionary Entries]
end{document}

produces

Three heading levels

Correct answer by moewe on January 23, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP