Consider the scenario: I'd like to subdivide the bibliography in my document into subbibliographies. I find the idea of categories particularly appealing. Thus I have annotated my .bib files with keywords. However, I'm extremely reluctant to add single keys to categories. To do this, I'd have to reference every citation twice: once in the \cite command and once more in the preamble of the document with \addtocategory. This seems redundant and also very risky in case I forget one or the other.

Since the category information is already present in the .bib files, is it possible to add items to a category via keywords?


1 Answer 1


On first glance what you describe sounds like you want to filter your bibliography with keyword/notkeyword directly.

Categories are supposed to offer a way to categories your bibliography dynamically from within the current document, keywords are supposed to be static and attach to an entry in the .bib file.


\usepackage[style=authoryear, backend=biber]{biblatex}

  author       = {Aristotle},
  title        = {De Anima},
  date         = 1907,
  editor       = {Hicks, Robert Drew},
  publisher    = {Cambridge University Press},
  location     = {Cambridge},
  keywords     = {primary},
  author       = {Nussbaum, Martha},
  title        = {Aristotle's \mkbibquote{De Motu Animalium}},
  date         = 1978,
  publisher    = {Princeton University Press},
  location     = {Princeton},
  keywords     = {secondary},
  author       = {Sigfridsson, Emma and Ryde, Ulf},
  title        = {Comparison of methods for deriving atomic charges from the
                  electrostatic potential and moments},
  journaltitle = {Journal of Computational Chemistry},
  date         = 1998,
  volume       = 19,
  number       = 4,
  pages        = {377-395},
  doi          = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},

\printbibliography[keyword=primary, title=Primary Sources]
\printbibliography[keyword=secondary, title=Secondary Sources]

It is possible to combine category and keyword filtering options and - if more complex logic is required - in bibliography filters (\defbibfilter) or bibliography checks (\defbibcheck).

  • That is of course a viable solution and if nothing else turns up I'll eventually resort to this. However, I quite like the way biblatex treats categories: The subheadings are very cleanly defined and \bibbycategory seems very intriguing. Ideally, I would define the categories in a preamble shared (with \input) by several documents. In the individual documents, I'd print the bibliography with \bibbycategory and would not even have care which categories are used in the individual documents. Jan 25, 2020 at 21:26

You must log in to answer this question.

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