summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex/doc/examples/19-alphabetic-prefixed-bibtex.tex
blob: 31cac5de0b3be7b01bf805923f9c4655fa7a2270 (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
%
% Prefixes also work with alphabetic the styles.
%
\documentclass[a4paper,oneside]{article}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=alphabetic,backend=bibtex]{biblatex}
\usepackage{hyperref}
\usepackage{nameref}
\addbibresource{biblatex-examples.bib}
% A catch-all filter for all items which are not assigned to a
% dedicated sub-bibliography:
\defbibfilter{other}{
  not type=article
  and
  not type=book
  and
  not type=collection
}
\begin{document}

\section*{Prefixed alphabetic citations}

% Some citations:
\cite{angenendt, kastenholz, augustine, companion, jaffe, ctan}

\nocite{*}

% Let's print the overall heading of the bibliography first:
\printbibheading

% And now the sub-bibliographies: we use three of them (based on the
% entry type). Each sub-bibliography assigns a different prefix. The
% option is called 'prefixnumbers' because it was originally intended
% for numeric citations only. It also works with alphabetic labels:
\printbibliography[heading=subbibliography,title={Articles},type=article,prefixnumbers={A-}]
\printbibliography[heading=subbibliography,title={Books},type=book,prefixnumbers={B-}]
\printbibliography[heading=subbibliography,title={Collections},type=collection,prefixnumbers={C-}]

% The catch-all sub-bibliography for all remaining types:
\printbibliography[heading=subbibliography,title={Other Sources},filter=other,prefixnumbers={O-}]

\end{document}