Debian Codegraph @

texmf-dist/doc/latex/biblatex/examples/50-style-authoryear.tex

raw
1 %
2 % This file presents the 'authoryear' style
3 %
4 \documentclass[a4paper]{article}
5 \usepackage[T1]{fontenc}
6 \usepackage[utf8]{inputenc}
7 \usepackage[american]{babel}
8 \usepackage{csquotes}
9 \usepackage[style=authoryear,backend=biber]{biblatex}
10 \usepackage{hyperref}
11 \addbibresource{biblatex-examples.bib}
12 \setlength{\parindent}{0pt}
13 % Some generic settings.
14 \newcommand{\cmd}[1]{\texttt{\textbackslash #1}}
15 \setlength{\parindent}{0pt}
16 \newenvironment{bibsample}
17 {\trivlist\samepage
18 \setlength{\itemsep}{0pt}}
19 {\endtrivlist}
20 \begin{document}
21
22 \section*{The \texttt{authoryear} style}
23
24 This style implements the author-year citation scheme.
25
26 \subsection*{Additional package options}
27
28 \subsubsection*{The \texttt{dashed} option}
29
30 By default, this style replaces recurrent authors/editors in the
31 bibliography by a dash so that items by the same author or editor
32 are visually grouped. This feature is controlled by the package
33 option \texttt{dashed}. Setting \texttt{dashed=false} in the
34 preamble will disable this feature. The default setting is
35 \texttt{dashed=true}.
36
37 \subsubsection*{The \texttt{mergedate} option}
38
39 Since this style prints the date label after the author/editor in the
40 bibliography, there are effectively two dates in the bibliography:
41 the full date specification (e.g., \enquote{2001}, \enquote{June
42 2006}, \enquote{5th~Jan. 2008}, whose format is controlled by the
43 \texttt{date} option) and the date label (e.g., \enquote{2006a},
44 whose format is controlled with the \texttt{labeldate} option),
45 as found in citations. The \texttt{mergedate} option controls whether
46 or not date specifications are merged with the date label.
47 This option is best explained by example. Note that
48 it only affects the bibliography. Citations use the date label only.
49
50 \begin{bibsample}
51 \item Doe 2000
52 \item Doe 2003a
53 \item Doe 2003b
54 \item Doe 2006a
55 \item Doe 2006b
56 \item Doe 2017
57 \end{bibsample}
58
59 \texttt{mergedate=false} strictly separates the date specification
60 (following \texttt{date}) from the date label (following \texttt{labeldate}).
61 The year will always be printed twice:
62
63 \begin{bibsample}
64 \item Doe, John (2000). \emph{Book~1}. Location: Publisher, 2000.
65 \item Doe, John (2003a). \emph{Book~2}. Location: Publisher, 2003.
66 \item Doe, John (2003b). \emph{Book~3}. Location: Publisher, 2003.
67 \item Doe, John (2006a). \enquote{Article~1}. In: \emph{Monthly Journal} 25.6
68 (June~2006), pp.~70--85.
69 \item Doe, John (2006b). \enquote{Article~2}. In: \emph{Quarterly Journal} 14.3
70 (Fall~2006), pp.~5--25.
71 \item Doe, John (2017). \emph{Webpage}. 7th Aug. 2017.
72 \end{bibsample}
73
74 \texttt{mergedate=minimum} omits the date whenever the full date
75 and the date label have exactly the same precision (date-time granularity).
76
77 \begin{bibsample}
78 \item Doe, John (2000). \emph{Book~1}. Location: Publisher.
79 \item Doe, John (2003a). \emph{Book~2}. Location: Publisher, 2003.
80 \item Doe, John (2003b). \emph{Book~3}. Location: Publisher, 2003.
81 \item Doe, John (2006a). \enquote{Article~1}. In: \emph{Monthly Journal} 25.6
82 (June~2006), pp.~70--85.
83 \item Doe, John (2006b). \enquote{Article~2}. In: \emph{Quarterly Journal} 14.3
84 (Fall~2006), pp.~5--25.
85 \item Doe, John (2017). \emph{Webpage}. 7th Aug. 2017.
86 \end{bibsample}
87
88 \texttt{mergedate=basic} is similar in concept but more economical.
89 It will also omit the date if it differs from the date label only by
90 \texttt{extradate}.
91
92 \begin{bibsample}
93 \item Doe, John (2000). \emph{Book~1}. Location: Publisher.
94 \item Doe, John (2003a). \emph{Book~2}. Location: Publisher.
95 \item Doe, John (2003b). \emph{Book~3}. Location: Publisher.
96 \item Doe, John (2006a). \enquote{Article~1}. In: \emph{Monthly Journal} 25.6
97 (June~2006), pp.~70--85.
98 \item Doe, John (2006b). \enquote{Article~2}. In: \emph{Quarterly Journal} 14.3
99 (Fall~2006), pp.~5--25.
100 \item Doe, John (2017). \emph{Webpage}. 7th Aug. 2017.
101 \end{bibsample}
102
103 \texttt{mergedate=compact} merges all date specifications with the
104 date labels. The merged date is printed in \texttt{date} format,
105 not \texttt{labeldate}, even if it is printed in the position of
106 the date label. The \texttt{issue} field is still treated specially:
107
108 \begin{bibsample}
109 \item Doe, John (2000). \emph{Book~1}. Location: Publisher.
110 \item Doe, John (2003a). \emph{Book~2}. Location: Publisher.
111 \item Doe, John (2003b). \emph{Book~3}. Location: Publisher.
112 \item Doe, John (June 2006a). \enquote{Article~1}. In: \emph{Monthly Journal} 25.6, pp.~70--85.
113 \item Doe, John (2006b). \enquote{Article~2}. In: \emph{Quarterly Journal} 14.3
114 (Fall), pp.~5--25.
115 \item Doe, John (7th Aug. 2017).\emph{Webpage}.
116 \end{bibsample}
117
118 \texttt{mergedate=maximum} strives for maximum compactness.
119 Like \texttt{mergedate=compact} this option merges the date
120 into the date label.
121 Even the \texttt{issue} field is merged with the date label:
122
123 \begin{bibsample}
124 \item Doe, John (2000). \emph{Book~1}. Location: Publisher.
125 \item Doe, John (2003a). \emph{Book~2}. Location: Publisher.
126 \item Doe, John (2003b). \emph{Book~3}. Location: Publisher.
127 \item Doe, John (June 2006a). \enquote{Article~1}. In: \emph{Monthly Journal} 25.6, pp.~70--85.
128 \item Doe, John (Fall 2006b). \enquote{Article~2}. In: \emph{Quarterly Journal} 14.3, pp.~5--25.
129 \item Doe, John (7th Aug. 2017).\emph{Webpage}.
130 \end{bibsample}
131
132 \texttt{mergedate=true} is an alias for \texttt{mergedate=compact}.
133 This is the default setting.
134
135 \subsection*{\cmd{cite} examples}
136
137 \cite{companion}
138
139 \cite[59]{companion}
140
141 \cite[see][]{companion}
142
143 \cite[see][59--63]{companion}
144
145 \subsection*{\cmd{parencite} examples}
146
147 This is just filler text \parencite{companion}.
148
149 This is just filler text \parencite[59]{companion}.
150
151 This is just filler text \parencite[see][]{companion}.
152
153 This is just filler text \parencite[see][59--63]{companion}.
154
155 \subsection*{\cmd{parencite*} examples}
156
157 \citeauthor{companion} show that this is just filler
158 text \parencite*{companion}.
159
160 \subsection*{\cmd{footcite} examples}
161
162 % Even though the author-year scheme is usually employed in
163 % conjunction with in-text citations, it works just fine in
164 % footnotes, too.
165
166 This is just filler text.\footcite{companion}
167
168 This is just filler text.\footcite[59]{companion}
169
170 This is just filler text.\footcite[See][]{companion}
171
172 This is just filler text.\footcite[See][59--63]{companion}
173
174 \subsection*{\cmd{textcite} examples}
175
176 \textcite{companion} show that this is just filler text.
177
178 \textcite[59]{companion} show that this is just filler text.
179
180 \textcite[see][]{companion} show that this is just filler text.
181
182 \textcite[see][59--63]{companion} show that this is just filler text.
183
184 \subsection*{\cmd{autocite} examples}
185
186 % By default, the \autocite command works like \parencite.
187 % The starred version works like \parencite*.
188
189 This is just filler text \autocite{companion}.
190
191 \citeauthor{companion} show that this is just filler
192 text \autocite*{companion}.
193
194 \subsection*{Multiple citations}
195
196 % By default, a list of multiple citations is not sorted. You can
197 % enable sorting by setting the 'sortcites' package option.
198
199 \cite{knuth:ct:c,aristotle:physics,knuth:ct:b,aristotle:poetics,aristotle:rhetoric,knuth:ct:d}
200
201 \subsection*{Shorthand examples}
202
203 % If an entry in the bib file includes a 'shorthand' field, the
204 % shorthand replaces the regular author-title citation.
205
206 \cite{kant:kpv,kant:ku}
207
208 \clearpage
209
210 % The list of shorthands.
211
212 \printshorthands
213
214 % The list of references. Note that the year is printed after the
215 % author or editor and that recurring author and editor names are
216 % replaced by a dash unless the entry is the first one on the
217 % current page or double page spread (depending on the setting of
218 % the 'pagetracker' package option). This style will implicitly set
219 % 'pagetracker=spread' at load time.
220
221 \nocite{*}
222 \printbibliography
223
224 \end{document}