summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-ms/doc/examples/12-references-by-segment-ms.tex
blob: 2e7f07926f9e58f4428e359d471bd80ef0aaac56 (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
49
%
% 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[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear,backend=biber]{biblatex-ms}
\usepackage{hyperref}
\usepackage{nameref}
\addbibresource{biblatex-examples.bib}
\defbibheading{subbibliography}{%
  \section*{%
    Chapter \therefsegment:
    \nameref{refsegment:\therefsection\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}