summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/biblatex/examples/12-references-by-segment.tex
blob: ca5b6c9e909a1c4973f2ab991c99c31be4c6ecc9 (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
46
47
48
%
% This file differs from the `by section' example in that the
% citation labels are assigned globally. They are not local to the
% `refsegment' environments.
%
\documentclass[a4paper,oneside]{book}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear]{biblatex}
\usepackage{hyperref}
\usepackage{nameref}
\bibliography{biblatex-examples}
\defbibheading{subbibliography}{%
  \section*{%
    Chapter \therefsegment:
    \nameref{refsegment:\therefsegment}}}
\begin{document}

\chapter{Title of first chapter}
\begin{refsegment}
This is just filler text \parencite{westfahl:space}.
This is just filler text \parencite{nietzsche:ksa}.
\end{refsegment}

\chapter{Title of second chapter}
\begin{refsegment}
This is just filler text \parencite{nietzsche:historie}.
This is just filler text \parencite{westfahl:frontier}.
\end{refsegment}

\chapter{Title of third chapter}
\begin{refsegment}
This is just filler text \parencite{aristotle:anima}.
This is just filler text \parencite{averroes/bland}.
\end{refsegment}

\printbibheading
\bibbysegment[heading=subbibliography]
%
% \bibbysegment is a shorthand for:
%
% \printbibliography[segment=1]
% \printbibliography[segment=2]
% \printbibliography[segment=3]
% ...

\end{document}