Debian Codegraph @

texmf-dist/doc/latex/biblatex/examples/11-references-by-section.tex

raw
1 %
2 % This file is similar to the 'per section' example except that
3 % all references are printed at the end of the document. The
4 % citation labels are still local to the 'refsection' environments.
5 %
6 % With Biber, this file is processed as follows:
7 %
8 % latex file
9 % biber file
10 % latex file
11 %
12 % With BibTeX, this file is processed as follows:
13 %
14 % latex file
15 % bibtex file1-blx
16 % bibtex file2-blx
17 % bibtex file3-blx
18 % latex file
19 %
20 % Note that the file name suffix may generally be omitted. It's
21 % 'latex file' and 'bibtex file' rather than 'latex file.tex' and
22 % 'bibtex file.aux'. Depending on the TeX distribution, omitting the
23 % 'aux' file prefix when invoking BibTeX may even by mandatory.
24 %
25 \documentclass[a4paper,oneside]{book}
26 \usepackage[T1]{fontenc}
27 \usepackage[utf8]{inputenc}
28 \usepackage[american]{babel}
29 \usepackage{csquotes}
30 \usepackage[style=authoryear,backend=biber]{biblatex}
31 \usepackage{hyperref}
32 \usepackage{nameref}
33 \addbibresource{biblatex-examples.bib}
34 \defbibheading{subbibliography}{%
35 \section*{%
36 Chapter \therefsection:
37 \nameref{refsection:\therefsection}}}
38 \begin{document}
39
40 \chapter{Title of first chapter}
41 \begin{refsection}
42 This is just filler text \parencite{westfahl:space}.
43 This is just filler text \parencite{nietzsche:ksa}.
44 \end{refsection}
45
46 \chapter{Title of second chapter}
47 \begin{refsection}
48 This is just filler text \parencite{nietzsche:historie}.
49 This is just filler text \parencite{westfahl:frontier}.
50 \end{refsection}
51
52 \chapter{Title of third chapter}
53 \begin{refsection}
54 This is just filler text \parencite{aristotle:anima}.
55 This is just filler text \parencite{averroes/bland}.
56 \end{refsection}
57
58 \printbibheading
59 \bibbysection[heading=subbibliography]
60 %
61 % \bibbysection is a shorthand for:
62 %
63 % \printbibliography[section=1]
64 % \printbibliography[section=2]
65 % \printbibliography[section=3]
66 % ...
67
68 \end{document}