Debian Codegraph @

texmf-dist/doc/latex/biblatex/examples/12-references-by-segment.tex

raw
1 %
2 % This file differs from the 'by section' example in that the
3 % citation labels are assigned globally. They are not local to the
4 % 'refsegment' environments.
5 %
6 \documentclass[a4paper,oneside]{book}
7 \usepackage[T1]{fontenc}
8 \usepackage[utf8]{inputenc}
9 \usepackage[american]{babel}
10 \usepackage{csquotes}
11 \usepackage[style=authoryear,backend=biber]{biblatex}
12 \usepackage{hyperref}
13 \usepackage{nameref}
14 \addbibresource{biblatex-examples.bib}
15 \defbibheading{subbibliography}{%
16 \section*{%
17 Chapter \therefsegment:
18 \nameref{refsegment:\therefsection\therefsegment}}}
19 \begin{document}
20
21 \chapter{Title of first chapter}
22 \begin{refsegment}
23 This is just filler text \parencite{westfahl:space}.
24 This is just filler text \parencite{nietzsche:ksa}.
25 \end{refsegment}
26
27 \chapter{Title of second chapter}
28 \begin{refsegment}
29 This is just filler text \parencite{nietzsche:historie}.
30 This is just filler text \parencite{westfahl:frontier}.
31 \end{refsegment}
32
33 \chapter{Title of third chapter}
34 \begin{refsegment}
35 This is just filler text \parencite{aristotle:anima}.
36 This is just filler text \parencite{averroes/bland}.
37 \end{refsegment}
38
39 \printbibheading
40 \bibbysegment[heading=subbibliography]
41 %
42 % \bibbysegment is a shorthand for:
43 %
44 % \printbibliography[segment=1]
45 % \printbibliography[segment=2]
46 % \printbibliography[segment=3]
47 % ...
48
49 \end{document}