Site icon texblog

Multiple bibliographies with biblatex

The biblatex package offers great flexibility while creating bibliographies. One of the things the package handles beautifully and can be achieved with little effort is the subdivision of a bibliography into multiple parts for per chapter/section bibliographies as well as by type or other patterns.

 

Per chapter/section bibliographies

Biblatex implements the refsection environment to collect all citation for a chapter or section and print them at end of a chapter, section or document. Here is an example for section-wise bibliographies. It works similarly for chapters. The following code illustrates how to use the refsection environment.

% Preamble
\usepackage[sorting=none, backend=biber]{biblatex} % load the package
\addbibresource{references.bib} % add a bib-reference file

% Document
\section{First}
\begin{refsection} % refsection environment
Citation section \thesection: \cite{knuth1986texbook} % collect citations
\printbibliography[heading=subbibliography] % print section bibliography
\end{refsection}

The following screenshot was taken from the PDF output of the complete minimal working example below. It generates section-wise bibliographies.

\documentclass{article}
\usepackage[sorting=none, backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{references.bib}
@book{knuth1986texbook,
  keywords = {book},
  title={The texbook},
  author={Knuth, D.E. and Bibby, D.},
  volume={1993},
  year={1986},
  publisher={Addison-Wesley}
}
@article{knuth1977fast,
  keywords = {article},
  title={Fast pattern matching in strings},
  author={Knuth, D.E. and Morris Jr, J.H. and Pratt, V.R.},
  journal={SIAM journal on computing},
  volume={6},
  number={2},
  pages={323--350},
  year={1977},
  publisher={SIAM}
}
\end{filecontents}
\addbibresource{references.bib}
\begin{document}
\section{First}
\begin{refsection}
Citation section \thesection: \cite{knuth1986texbook}
\printbibliography[heading=subbibliography]
\end{refsection}
\section{Second}
\begin{refsection}
Citation section \thesection: \cite{knuth1977fast}
\printbibliography[heading=subbibliography]
\end{refsection}
\end{document}

The biblatex package documentation has examples on how to insert bibliographies for every chapter at the end of the document.

 

Type-/keyword-specific bibliographies

Subdividing the bibliography by bib-entry type (book, article, online, etc.) or by keywords is handled slightly differently by the package, but fortunately, the solution is similarly simple.

Subdividing by bib-entry type

The \printbibliography command takes the optional argument type, defining bib-types to include and nottype, defining bib-types to exclude. Multiple bib-entry types can be combined for inclusion and exclusion. Suppose, for example, we would like to have three bibliographies, one for books, one for articles, and one for the everything else:

\printbibliography[title={Book references},type=book]
\printbibliography[title={Article references},type=article]
\printbibliography[title={Other references}, nottype=article, nottype=book]

In the following example, I am using three references by Donald E. Knuth, a book, an article and an inproceedings type.

\documentclass{report}
\usepackage[sorting=none, backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{references.bib}
@book{knuth1986texbook,
  title={The texbook},
  author={Knuth, D.E. and Bibby, D.},
  volume={1993},
  year={1986},
  publisher={Addison-Wesley}
}
@article{knuth1977fast,
  title={Fast pattern matching in strings},
  author={Knuth, D.E. and Morris Jr, J.H. and Pratt, V.R.},
  journal={SIAM journal on computing},
  volume={6},
  number={2},
  pages={323--350},
  year={1977},
  publisher={SIAM}
}
@inproceedings{knuth1970simple,
  title={Simple word problems in universal algebras},
  author={Knuth, D.E. and Bendix, P.B.},
  booktitle={Computational problems in abstract algebra},
  volume={263},
  pages={297},
  year={1970}
}
\end{filecontents}
\addbibresource{references.bib}
\begin{document}
See \cite{knuth1986texbook} and \cite{knuth1977fast} and \cite{knuth1970simple}.
\printbibliography[title={Book references},type=book]
\printbibliography[title={Article references},type=article]
\printbibliography[title={Other references}, nottype=book, nottype=article]
\end{document}

Subdividing by keywords

In case you intend to subdivide your bibliography by another pattern than type, you may use the “keywords”-field of bib-entries for subdivision. For example, to subdivide the bibliography into “own” and other references, use the keyword “own” for each of your own publication.

article{texblog2012,
  keywords = {own}, % keyword for subdivided bibliography
  title={My fancy publication},
  author={Texblog, T},
  journal={TUGboat},
  volume={33},
  number={3},
  pages={1001--1002},
  year={2012},
}
\printbibliography[keyword=own,...]
\printbibliography[notkeyword=own,...]

By the way, TUGboat is the TeX Users Group journal. I made the publication up.

There are other ways to subdivide the bibliography of a document into several parts. See the package documentation or drop me a comment below if you have a question related to the topic.

Exit mobile version