summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/biblatex/examples/14-references-by-category.tex
blob: ad5301b2d5262fa1daa919854555ad55631ef3a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
%
% This example will yield the same output as the 'keywords' example
% but the approach is different. Instead of adding the filter
% criteria to the bib file, we assign keys to categories in the
% document preamble and use 'category' filters to create a
% subdivided bibliography.
%
\documentclass[a4paper,oneside]{book}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=authortitle]{biblatex}
\usepackage{hyperref}
\addbibresource{biblatex-examples.bib}
\DeclareBibliographyCategory{primary}
\DeclareBibliographyCategory{secondary}
\addtocategory{primary}{aristotle:anima,aristotle:physics,averroes/bland}
\addtocategory{secondary}{hyman,moraux,nussbaum,pines}
\defbibheading{primary}{\section*{Primary Sources}}
\defbibheading{secondary}{\section*{Secondary Sources}}
\begin{document}

\chapter{References by category}

This is just filler text.\footcite{aristotle:anima}
This is just filler text.\footcite{nussbaum}
This is just filler text.\footcite{averroes/bland}
This is just filler text.\footcite{hyman}
This is just filler text.\footcite{aristotle:physics}
This is just filler text.\footcite{moraux}
This is just filler text.\footcite{pines}

\printbibheading
\bibbycategory
%
% \bibbycategory processes the categories in the order in which they
% were declared. Note that the category name also serves as a heading
% identifier, i.e. you need to define a matching heading for every
% category. In this document, \bibbycategory is a shorthand for:
%
% \printbibliography[heading=primary,category=primary]
% \printbibliography[heading=secondary,category=secondary]
% ...

\end{document}