Debian Codegraph @

texmf-dist/doc/latex/biblatex/examples/31-style-numeric-comp.tex

raw
1 %
2 % This file presents the 'numeric-comp' style
3 %
4 \documentclass[a4paper]{article}
5 \usepackage[T1]{fontenc}
6 \usepackage[utf8]{inputenc}
7 \usepackage[american]{babel}
8 \usepackage{csquotes}
9 \usepackage[style=numeric-comp,subentry,backend=biber]{biblatex}
10 \usepackage{hyperref}
11 \addbibresource{biblatex-examples.bib}
12 % Some generic settings.
13 \newcommand{\cmd}[1]{\texttt{\textbackslash #1}}
14 \setlength{\parindent}{0pt}
15 \begin{document}
16
17 \section*{The \texttt{numeric-comp} style}
18
19 This style is similar to \texttt{numeric} except that a list of
20 multiple citations is sorted and any sequence of more than two
21 consecutive numbers is formatted as a range. This style will
22 implicitly enable the \texttt{sortcites} package option at load
23 time.
24
25 \subsection*{Additional package options}
26
27 \subsubsection*{The \texttt{subentry} option}
28
29 The option \texttt{subentry} affects the handling of citations
30 referring to members of a reference set. If this option is enabled,
31 such citations get an extra letter which identifies the member
32 (it is also printed in the bibliography):
33 \cite{glashow,yoon,salam,aksin,companion}.
34
35 This option is disabled by default, but it has been enabled
36 in this example. If disabled, citations referring to a set member
37 will point to the entire set, i.e., the above citations would
38 come out as
39 \begingroup\boolfalse{bbx:subentry}% don't try this at home
40 \cite{stdmodel,set,stdmodel,set,companion}.
41 \endgroup
42
43 \subsection*{The \texttt{subentrycomp} option}
44
45 The option \texttt{subentrycomp} controls whether or not citations
46 to subentries of the same sets are compressed as well.
47 It only becomes relevant if \texttt{subentry} is set to \texttt{true},
48 with \texttt{subentry=false} it has no effect.
49 If \texttt{subentrycomp} is enabled,
50 subentries that belong to the same
51 set are shown in a more compact form:
52 \cite{glashow,herrmann,aksin,yoon,salam,companion}.
53
54 If the option is disabled, subentries of sets are shown as in
55 the \texttt{numeric} style:
56 \begingroup\togglefalse{cbx:subentrycomp}% don't try this at home
57 \cite{glashow,herrmann,aksin,yoon,salam,companion}.
58 \endgroup
59
60 This option is implemented for backwards compatibility,
61 earlier versions of \texttt{biblatex} behaved like
62 \texttt{subentrycomp=false}, current versions have
63 \texttt{subentrycomp=true} enabled.
64
65 \subsection*{Multiple citations}
66
67 \cite{bertram,augustine}
68
69 \cite{murray,bertram,augustine,companion,cotton}
70
71 \cite{augustine,bertram,cotton,hammond,set,massa,murray}
72
73 \cite{bertram,companion,cotton,augustine,massa,set,hammond,murray,stdmodel}
74
75 \cite{yoon,weinberg}
76
77 \subsection*{Multiple citations with \cmd{supercite}}
78
79 This is just filler text.\supercite{bertram,augustine}
80
81 This is just filler text.\supercite{murray,bertram,augustine,companion,cotton}
82
83 This is just filler text.\supercite{augustine,bertram,cotton,hammond,set,massa,murray}
84
85 This is just filler text.\supercite{bertram,companion,cotton,augustine,massa,set,hammond,murray,stdmodel}
86
87 This is just filler text.\supercite{yoon,weinberg}
88
89 \clearpage
90 \printbibliography
91
92 \end{document}