summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/biblatex/examples/01-introduction.tex
blob: 5122a38816512c8f3e8fcd2e0572dfb3a8b456ee (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
%
% This file briefly presents the main citation commands. It also
% illustrates the typical structure of a document based on biblatex.
% Note that the \bibliography command is used in the document
% preamble and  that there is no \bibliographystyle command at all.
% The bibliography is printed by way of \printbibliography.
%
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
%
% We load the babel package and specify the main language of the
% document. If babel is detected, biblatex will automatically adjust
% to the default language of the document.
\usepackage[american]{babel}
%
% We load the csquotes package, which is required for
% language-specific quotation marks. See the csquotes manual for
% further information about this package.
\usepackage{csquotes}
%
% We are using the `authoryear' style in this example.
% The default is the `numerical' style.
\usepackage[style=authoryear]{biblatex}
%
% Note that the \bibliography command is used in the document
% preamble. Our database file is "examples.bib".
\bibliography{biblatex-examples}
%
% Some generic settings.
\newcommand{\cmd}[1]{\texttt{\textbackslash #1}}
\setlength{\parindent}{0pt}
\begin{document}

\section*{Standard citation commands}

\subsection*{The \cmd{cite} command}

% The \cite command prints a bare citation without parentheses.

\cite{companion}

\cite[59]{companion}

\cite[See][]{companion}

\cite[See][59--63]{companion}

\subsection*{The \cmd{parencite} command}

% The \parencite command, which is intended for in-text citations,
% encloses the citation in parentheses. Note that the `numeric' and
% `alphabetic' styles use square brackets instead.

This is just filler text \parencite{companion}.

This is just filler text \parencite[59]{companion}.

This is just filler text \parencite[See][]{companion}.

This is just filler text \parencite[See][59--63]{companion}.

\subsection*{The \cmd{footcite} command}

% The \footcite command is similar to \parencite, except that the
% citation is given in a footnote.

This is just filler text.\footcite{companion}

This is just filler text.\footcite[59]{companion}

This is just filler text.\footcite[See][]{companion}

This is just filler text.\footcite[See][59--63]{companion}

\subsection*{The \cmd{textcite} command}

% The \textcite command is intended for citations integrated in the
% flow of text, replacing the subject of the sentence.

\textcite{companion} show that this is just filler text.

\textcite[59]{companion} show that this is just filler text.

% With \textcite, the first optional argument is of limited use
% only, since you could simply place the prenote in front of the
% citation. It is still supported for the sake of consistency.

\textcite[See][]{companion} for more filler text.

\textcite[See][59--63]{companion} for more filler text.

\section*{Style-independent commands}

\subsection*{The \cmd{autocite} command}

% The point of the \autocite command is that it automatically adapts
% to the predominant citation format (inline or footnote) normally
% used with the selected citation style. It should be used at the
% end of the sentence and usually works like \parencite or
% \footcite, depending on the citation style and the setting of the
% `autocite' package option. With the author-year style used in this
% example, it works like \parencite:

This is just filler text \autocite{companion}.

\section*{Text commands}

% There are a few predefined commands for bibliographic data which
% is frequently used in the flow of text. Note that biblatex also
% grants access to all lists and fields at a lower level, see below.

\citeauthor{companion} show that this is just filler text.

% Note that \citetitle will use the `shorttitle' field, if
% available.

See the \citetitle{companion} for more filler text.

% \citetitle*, on the other hand, always prints the `title'
% field.

See also: \citetitle*{companion}.

\citetitle*{companion} by \citeauthor{companion} was
published in \citeyear{companion}.

\section*{Special commands}

% The \nocite command adds an entry to the bibliography without
% printing any citation. If the argument is an asterisk (i.e.,
% '\nocite{*}'), all entries found in the bib file are added to the
% bibliography.

No citation here.\nocite{knuth:ct}

% The \fullcite command prints a verbose citation similar to the
% full bibliography entry.

\fullcite{companion}

% \footfullcite is similar to \fullcite, except that the citation is
% put in a footnote.

This is just filler text.\footfullcite{companion}

\section*{Low-level commands}

% The commands in this section grant low-level access to all
% bibliographic data. See the biblatex manual for details about the
% different data types (name lists, literal lists, fields).

% The \citename command prints a name list. For example, the
% \citeauthor command shown above is similar to the following
% low-level command:

\citename{companion}{author}

% The \citelist command is similar to \citename but prints literal
% lists.

\citelist{companion}{publisher}

% The \citefield command prints fields. For example, the
% \citetitle* command shown above is similar to the following
% low-level command (except for the formatting):

\citefield{companion}{title}

% The list of references is printed by way of \printbibliography.

\printbibliography

\end{document}