1 | %%
|
---|
2 | %% This is file `natbib.sty',
|
---|
3 | %% generated with the docstrip utility.
|
---|
4 | %%
|
---|
5 | %% The original source files were:
|
---|
6 | %%
|
---|
7 | %% natbib.dtx (with options: `package,all')
|
---|
8 | %% =============================================
|
---|
9 | %% IMPORTANT NOTICE:
|
---|
10 | %%
|
---|
11 | %% This program can be redistributed and/or modified under the terms
|
---|
12 | %% of the LaTeX Project Public License Distributed from CTAN
|
---|
13 | %% archives in directory macros/latex/base/lppl.txt; either
|
---|
14 | %% version 1 of the License, or any later version.
|
---|
15 | %%
|
---|
16 | %% This is a generated file.
|
---|
17 | %% It may not be distributed without the original source file natbib.dtx.
|
---|
18 | %%
|
---|
19 | %% Full documentation can be obtained by LaTeXing that original file.
|
---|
20 | %% Only a few abbreviated comments remain here to describe the usage.
|
---|
21 | %% =============================================
|
---|
22 | %% Copyright 1993-2003 Patrick W Daly
|
---|
23 | %% Max-Planck-Institut f\"ur Aeronomie
|
---|
24 | %% Max-Planck-Str. 2
|
---|
25 | %% D-37191 Katlenburg-Lindau
|
---|
26 | %% Germany
|
---|
27 | %% E-mail: daly@linmpi.mpg.de
|
---|
28 | \NeedsTeXFormat{LaTeX2e}[1995/06/01]
|
---|
29 | \ProvidesPackage{natbib}
|
---|
30 | [2003/06/06 7.1 (PWD)]
|
---|
31 | % This package reimplements the LaTeX \cite command to be used for various
|
---|
32 | % citation styles, both author-year and numerical. It accepts BibTeX
|
---|
33 | % output intended for many other packages, and therefore acts as a
|
---|
34 | % general, all-purpose citation-style interface.
|
---|
35 | %
|
---|
36 | % With standard numerical .bst files, only numerical citations are
|
---|
37 | % possible. With an author-year .bst file, both numerical and
|
---|
38 | % author-year citations are possible.
|
---|
39 | %
|
---|
40 | % If author-year citations are selected, \bibitem must have one of the
|
---|
41 | % following forms:
|
---|
42 | % \bibitem[Jones et al.(1990)]{key}...
|
---|
43 | % \bibitem[Jones et al.(1990)Jones, Baker, and Williams]{key}...
|
---|
44 | % \bibitem[Jones et al., 1990]{key}...
|
---|
45 | % \bibitem[\protect\citeauthoryear{Jones, Baker, and Williams}{Jones
|
---|
46 | % et al.}{1990}]{key}...
|
---|
47 | % \bibitem[\protect\citeauthoryear{Jones et al.}{1990}]{key}...
|
---|
48 | % \bibitem[\protect\astroncite{Jones et al.}{1990}]{key}...
|
---|
49 | % \bibitem[\protect\citename{Jones et al., }1990]{key}...
|
---|
50 | % \harvarditem[Jones et al.]{Jones, Baker, and Williams}{1990}{key}...
|
---|
51 | %
|
---|
52 | % This is either to be made up manually, or to be generated by an
|
---|
53 | % appropriate .bst file with BibTeX.
|
---|
54 | % Author-year mode || Numerical mode
|
---|
55 | % Then, \citet{key} ==>> Jones et al. (1990) || Jones et al. [21]
|
---|
56 | % \citep{key} ==>> (Jones et al., 1990) || [21]
|
---|
57 | % Multiple citations as normal:
|
---|
58 | % \citep{key1,key2} ==>> (Jones et al., 1990; Smith, 1989) || [21,24]
|
---|
59 | % or (Jones et al., 1990, 1991) || [21,24]
|
---|
60 | % or (Jones et al., 1990a,b) || [21,24]
|
---|
61 | % \cite{key} is the equivalent of \citet{key} in author-year mode
|
---|
62 | % and of \citep{key} in numerical mode
|
---|
63 | % Full author lists may be forced with \citet* or \citep*, e.g.
|
---|
64 | % \citep*{key} ==>> (Jones, Baker, and Williams, 1990)
|
---|
65 | % Optional notes as:
|
---|
66 | % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
|
---|
67 | % \citep[e.g.,][]{key} ==>> (e.g., Jones et al., 1990)
|
---|
68 | % \citep[see][pg. 34]{key}==>> (see Jones et al., 1990, pg. 34)
|
---|
69 | % (Note: in standard LaTeX, only one note is allowed, after the ref.
|
---|
70 | % Here, one note is like the standard, two make pre- and post-notes.)
|
---|
71 | % \citealt{key} ==>> Jones et al. 1990
|
---|
72 | % \citealt*{key} ==>> Jones, Baker, and Williams 1990
|
---|
73 | % \citealp{key} ==>> Jones et al., 1990
|
---|
74 | % \citealp*{key} ==>> Jones, Baker, and Williams, 1990
|
---|
75 | % Additional citation possibilities (both author-year and numerical modes)
|
---|
76 | % \citeauthor{key} ==>> Jones et al.
|
---|
77 | % \citeauthor*{key} ==>> Jones, Baker, and Williams
|
---|
78 | % \citeyear{key} ==>> 1990
|
---|
79 | % \citeyearpar{key} ==>> (1990)
|
---|
80 | % \citetext{priv. comm.} ==>> (priv. comm.)
|
---|
81 | % Note: full author lists depends on whether the bib style supports them;
|
---|
82 | % if not, the abbreviated list is printed even when full requested.
|
---|
83 | %
|
---|
84 | % For names like della Robbia at the start of a sentence, use
|
---|
85 | % \Citet{dRob98} ==>> Della Robbia (1998)
|
---|
86 | % \Citep{dRob98} ==>> (Della Robbia, 1998)
|
---|
87 | % \Citeauthor{dRob98} ==>> Della Robbia
|
---|
88 | %
|
---|
89 | %
|
---|
90 | % Citation aliasing is achieved with
|
---|
91 | % \defcitealias{key}{text}
|
---|
92 | % \citetalias{key} ==>> text
|
---|
93 | % \citepalias{key} ==>> (text)
|
---|
94 | %
|
---|
95 | % Defining the citation style of a given bib style:
|
---|
96 | % Use \bibpunct (in the preamble only) with 6 mandatory arguments:
|
---|
97 | % 1. opening bracket for citation
|
---|
98 | % 2. closing bracket
|
---|
99 | % 3. citation separator (for multiple citations in one \cite)
|
---|
100 | % 4. the letter n for numerical styles, s for superscripts
|
---|
101 | % else anything for author-year
|
---|
102 | % 5. punctuation between authors and date
|
---|
103 | % 6. punctuation between years (or numbers) when common authors missing
|
---|
104 | % One optional argument is the character coming before post-notes. It
|
---|
105 | % appears in square braces before all other arguments. May be left off.
|
---|
106 | % Example (and default) \bibpunct[, ]{(}{)}{;}{a}{,}{,}
|
---|
107 | %
|
---|
108 | % To make this automatic for a given bib style, named newbib, say, make
|
---|
109 | % a local configuration file, natbib.cfg, with the definition
|
---|
110 | % \newcommand{\bibstyle@newbib}{\bibpunct...}
|
---|
111 | % Then the \bibliographystyle{newbib} will cause \bibstyle@newbib to
|
---|
112 | % be called on THE NEXT LATEX RUN (via the aux file).
|
---|
113 | %
|
---|
114 | % Such preprogrammed definitions may be invoked in the text (preamble only)
|
---|
115 | % by calling \citestyle{newbib}. This is only useful if the style specified
|
---|
116 | % differs from that in \bibliographystyle.
|
---|
117 | %
|
---|
118 | % With \citeindextrue and \citeindexfalse, one can control whether the
|
---|
119 | % \cite commands make an automatic entry of the citation in the .idx
|
---|
120 | % indexing file. For this, \makeindex must also be given in the preamble.
|
---|
121 | %
|
---|
122 | % LaTeX2e Options: (for selecting punctuation)
|
---|
123 | % round - round parentheses are used (default)
|
---|
124 | % square - square brackets are used [option]
|
---|
125 | % curly - curly braces are used {option}
|
---|
126 | % angle - angle brackets are used <option>
|
---|
127 | % colon - multiple citations separated by colon (default)
|
---|
128 | % comma - separated by comma
|
---|
129 | % authoryear - selects author-year citations (default)
|
---|
130 | % numbers- selects numerical citations
|
---|
131 | % super - numerical citations as superscripts
|
---|
132 | % sort - sorts multiple citations according to order in ref. list
|
---|
133 | % sort&compress - like sort, but also compresses numerical citations
|
---|
134 | % longnamesfirst - makes first citation full author list
|
---|
135 | % sectionbib - puts bibliography in a \section* instead of \chapter*
|
---|
136 | % Punctuation so selected dominates over any predefined ones.
|
---|
137 | % LaTeX2e options are called as, e.g.
|
---|
138 | % \usepackage[square,comma]{natbib}
|
---|
139 | % LaTeX the source file natbib.dtx to obtain more details
|
---|
140 | % or the file natnotes.tex for a brief reference sheet.
|
---|
141 | %-----------------------------------------------------------
|
---|
142 | \@ifclassloaded{aguplus}{\PackageError{natbib}
|
---|
143 | {The aguplus class already includes natbib coding,\MessageBreak
|
---|
144 | so you should not add it explicitly}
|
---|
145 | {Type <Return> for now, but then later remove\MessageBreak
|
---|
146 | the command \protect\usepackage{natbib} from the document}
|
---|
147 | \endinput}{}
|
---|
148 | \@ifclassloaded{nlinproc}{\PackageError{natbib}
|
---|
149 | {The nlinproc class already includes natbib coding,\MessageBreak
|
---|
150 | so you should not add it explicitly}
|
---|
151 | {Type <Return> for now, but then later remove\MessageBreak
|
---|
152 | the command \protect\usepackage{natbib} from the document}
|
---|
153 | \endinput}{}
|
---|
154 | \@ifclassloaded{egs}{\PackageError{natbib}
|
---|
155 | {The egs class already includes natbib coding,\MessageBreak
|
---|
156 | so you should not add it explicitly}
|
---|
157 | {Type <Return> for now, but then later remove\MessageBreak
|
---|
158 | the command \protect\usepackage{natbib} from the document}
|
---|
159 | \endinput}{}
|
---|
160 | % Define citation punctuation for some author-year styles
|
---|
161 | % One may add and delete at this point
|
---|
162 | % Or put additions into local configuration file natbib.cfg
|
---|
163 | \newcommand\bibstyle@chicago{\bibpunct{(}{)}{;}{a}{,}{,}}
|
---|
164 | \newcommand\bibstyle@named{\bibpunct{[}{]}{;}{a}{,}{,}}
|
---|
165 | \newcommand\bibstyle@agu{\bibpunct{[}{]}{;}{a}{,}{,~}}%Amer. Geophys. Union
|
---|
166 | \newcommand\bibstyle@egs{\bibpunct{(}{)}{;}{a}{,}{,}}%Eur. Geophys. Soc.
|
---|
167 | \newcommand\bibstyle@agsm{\bibpunct{(}{)}{,}{a}{}{,}\gdef\harvardand{\&}}
|
---|
168 | \newcommand\bibstyle@kluwer{\bibpunct{(}{)}{,}{a}{}{,}\gdef\harvardand{\&}}
|
---|
169 | \newcommand\bibstyle@dcu{\bibpunct{(}{)}{;}{a}{;}{,}\gdef\harvardand{and}}
|
---|
170 | \newcommand\bibstyle@aa{\bibpunct{(}{)}{;}{a}{}{,}} %Astronomy & Astrophysics
|
---|
171 | \newcommand\bibstyle@pass{\bibpunct{(}{)}{;}{a}{,}{,}}%Planet. & Space Sci
|
---|
172 | \newcommand\bibstyle@anngeo{\bibpunct{(}{)}{;}{a}{,}{,}}%Annales Geophysicae
|
---|
173 | \newcommand\bibstyle@nlinproc{\bibpunct{(}{)}{;}{a}{,}{,}}%Nonlin.Proc.Geophys.
|
---|
174 | % Define citation punctuation for some numerical styles
|
---|
175 | \newcommand\bibstyle@cospar{\bibpunct{/}{/}{,}{n}{}{}%
|
---|
176 | \gdef\NAT@biblabelnum##1{##1.}}
|
---|
177 | \newcommand\bibstyle@esa{\bibpunct{(Ref.~}{)}{,}{n}{}{}%
|
---|
178 | \gdef\NAT@biblabelnum##1{##1.\hspace{1em}}}
|
---|
179 | \newcommand\bibstyle@nature{\bibpunct{}{}{,}{s}{}{\textsuperscript{,}}%
|
---|
180 | \gdef\NAT@biblabelnum##1{##1.}}
|
---|
181 | % The standard LaTeX styles
|
---|
182 | \newcommand\bibstyle@plain{\bibpunct{[}{]}{,}{n}{}{,}}
|
---|
183 | \let\bibstyle@alpha=\bibstyle@plain
|
---|
184 | \let\bibstyle@abbrv=\bibstyle@plain
|
---|
185 | \let\bibstyle@unsrt=\bibstyle@plain
|
---|
186 | % The author-year modifications of the standard styles
|
---|
187 | \newcommand\bibstyle@plainnat{\bibpunct{[}{]}{,}{a}{,}{,}}
|
---|
188 | \let\bibstyle@abbrvnat=\bibstyle@plainnat
|
---|
189 | \let\bibstyle@unsrtnat=\bibstyle@plainnat
|
---|
190 | \newif\ifNAT@numbers \NAT@numbersfalse
|
---|
191 | \newif\ifNAT@super \NAT@superfalse
|
---|
192 | \DeclareOption{numbers}{\NAT@numberstrue
|
---|
193 | \ExecuteOptions{square,comma,nobibstyle}}
|
---|
194 | \DeclareOption{super}{\NAT@supertrue\NAT@numberstrue
|
---|
195 | \renewcommand\NAT@open{}\renewcommand\NAT@close{}
|
---|
196 | \ExecuteOptions{nobibstyle}}
|
---|
197 | \DeclareOption{authoryear}{\NAT@numbersfalse
|
---|
198 | \ExecuteOptions{round,colon,bibstyle}}
|
---|
199 | \DeclareOption{round}{%
|
---|
200 | \renewcommand\NAT@open{(} \renewcommand\NAT@close{)}
|
---|
201 | \ExecuteOptions{nobibstyle}}
|
---|
202 | \DeclareOption{square}{%
|
---|
203 | \renewcommand\NAT@open{[} \renewcommand\NAT@close{]}
|
---|
204 | \ExecuteOptions{nobibstyle}}
|
---|
205 | \DeclareOption{angle}{%
|
---|
206 | \renewcommand\NAT@open{$<$} \renewcommand\NAT@close{$>$}
|
---|
207 | \ExecuteOptions{nobibstyle}}
|
---|
208 | \DeclareOption{curly}{%
|
---|
209 | \renewcommand\NAT@open{\{} \renewcommand\NAT@close{\}}
|
---|
210 | \ExecuteOptions{nobibstyle}}
|
---|
211 | \DeclareOption{comma}{\renewcommand\NAT@sep{,}
|
---|
212 | \ExecuteOptions{nobibstyle}}
|
---|
213 | \DeclareOption{colon}{\renewcommand\NAT@sep{;}
|
---|
214 | \ExecuteOptions{nobibstyle}}
|
---|
215 | \DeclareOption{nobibstyle}{\let\bibstyle=\@gobble}
|
---|
216 | \DeclareOption{bibstyle}{\let\bibstyle=\@citestyle}
|
---|
217 | \newif\ifNAT@openbib \NAT@openbibfalse
|
---|
218 | \DeclareOption{openbib}{\NAT@openbibtrue}
|
---|
219 | \DeclareOption{sectionbib}{\def\NAT@sectionbib{on}}
|
---|
220 | \def\NAT@sort{0}
|
---|
221 | \DeclareOption{sort}{\def\NAT@sort{1}}
|
---|
222 | \DeclareOption{sort&compress}{\def\NAT@sort{2}}
|
---|
223 | \@ifpackageloaded{cite}{\PackageWarningNoLine{natbib}
|
---|
224 | {The `cite' package should not be used\MessageBreak
|
---|
225 | with natbib. Use option `sort' instead}\ExecuteOptions{sort}}{}
|
---|
226 | \newif\ifNAT@longnames\NAT@longnamesfalse
|
---|
227 | \DeclareOption{longnamesfirst}{\NAT@longnamestrue}
|
---|
228 | \DeclareOption{nonamebreak}{\def\NAT@nmfmt#1{\mbox{\NAT@up#1}}}
|
---|
229 | \def\NAT@nmfmt#1{{\NAT@up#1}}
|
---|
230 | \renewcommand\bibstyle[1]{\@ifundefined{bibstyle@#1}{\relax}
|
---|
231 | {\csname bibstyle@#1\endcsname}}
|
---|
232 | \AtBeginDocument{\global\let\bibstyle=\@gobble}
|
---|
233 | \let\@citestyle\bibstyle
|
---|
234 | \newcommand\citestyle[1]{\@citestyle{#1}\let\bibstyle\@gobble}
|
---|
235 | \@onlypreamble{\citestyle}\@onlypreamble{\@citestyle}
|
---|
236 | \newcommand\bibpunct[7][, ]%
|
---|
237 | {\gdef\NAT@open{#2}\gdef\NAT@close{#3}\gdef
|
---|
238 | \NAT@sep{#4}\global\NAT@numbersfalse\ifx #5n\global\NAT@numberstrue
|
---|
239 | \else
|
---|
240 | \ifx #5s\global\NAT@numberstrue\global\NAT@supertrue
|
---|
241 | \fi\fi
|
---|
242 | \gdef\NAT@aysep{#6}\gdef\NAT@yrsep{#7}%
|
---|
243 | \gdef\NAT@cmt{#1}%
|
---|
244 | \global\let\bibstyle\@gobble
|
---|
245 | }
|
---|
246 | \@onlypreamble{\bibpunct}
|
---|
247 | \newcommand\NAT@open{(} \newcommand\NAT@close{)}
|
---|
248 | \newcommand\NAT@sep{;}
|
---|
249 | \ProcessOptions
|
---|
250 | \newcommand\NAT@aysep{,} \newcommand\NAT@yrsep{,}
|
---|
251 | \newcommand\NAT@cmt{, }
|
---|
252 | \newcommand\NAT@cite%
|
---|
253 | [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\ \fi
|
---|
254 | #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup}
|
---|
255 | \newcommand\NAT@citenum%
|
---|
256 | [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\ \fi
|
---|
257 | #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup}
|
---|
258 | \newcommand\NAT@citesuper[3]{\ifNAT@swa
|
---|
259 | \unskip\kern\p@\textsuperscript{#1}%
|
---|
260 | \if*#3*\else\ (#3)\fi\else #1\fi\endgroup}
|
---|
261 | \providecommand
|
---|
262 | \textsuperscript[1]{\mbox{$^{\mbox{\scriptsize#1}}$}}
|
---|
263 | \providecommand\@firstofone[1]{#1}
|
---|
264 | \newcommand\NAT@citexnum{}
|
---|
265 | \def\NAT@citexnum[#1][#2]#3{%
|
---|
266 | \NAT@sort@cites{#3}%
|
---|
267 | \let\@citea\@empty
|
---|
268 | \@cite{\def\NAT@num{-1}\let\NAT@last@yr\relax\let\NAT@nm\@empty
|
---|
269 | \@for\@citeb:=\NAT@cite@list\do
|
---|
270 | {\edef\@citeb{\expandafter\@firstofone\@citeb}%
|
---|
271 | \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
|
---|
272 | \@ifundefined{b@\@citeb\@extra@b@citeb}{%
|
---|
273 | {\reset@font\bfseries?}
|
---|
274 | \NAT@citeundefined\PackageWarning{natbib}%
|
---|
275 | {Citation `\@citeb' on page \thepage \space undefined}}%
|
---|
276 | {\let\NAT@last@num\NAT@num\let\NAT@last@nm\NAT@nm
|
---|
277 | \NAT@parse{\@citeb}%
|
---|
278 | \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
|
---|
279 | \let\NAT@name=\NAT@all@names
|
---|
280 | \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
|
---|
281 | \fi
|
---|
282 | \ifNAT@full\let\NAT@nm\NAT@all@names\else
|
---|
283 | \let\NAT@nm\NAT@name\fi
|
---|
284 | \ifNAT@swa
|
---|
285 | \ifnum\NAT@ctype>1\relax\@citea
|
---|
286 | \hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
287 | \ifnum\NAT@ctype=2\relax\NAT@test{\NAT@ctype}%
|
---|
288 | \else\NAT@alias
|
---|
289 | \fi\hyper@natlinkend\else
|
---|
290 | \ifnum\NAT@sort>1
|
---|
291 | \begingroup\catcode`\_=8
|
---|
292 | \ifcat _\ifnum\z@<0\NAT@num _\else A\fi
|
---|
293 | \global\let\NAT@nm=\NAT@num \else \gdef\NAT@nm{-2}\fi
|
---|
294 | \ifcat _\ifnum\z@<0\NAT@last@num _\else A\fi
|
---|
295 | \global\@tempcnta=\NAT@last@num \global\advance\@tempcnta by\@ne
|
---|
296 | \else \global\@tempcnta\m@ne\fi
|
---|
297 | \endgroup
|
---|
298 | \ifnum\NAT@nm=\@tempcnta
|
---|
299 | \ifx\NAT@last@yr\relax
|
---|
300 | \edef\NAT@last@yr{\@citea \mbox{\noexpand\citenumfont{\NAT@num}}}%
|
---|
301 | \else
|
---|
302 | \edef\NAT@last@yr{--\penalty\@m\mbox{\noexpand\citenumfont{\NAT@num}}}%
|
---|
303 | \fi
|
---|
304 | \else
|
---|
305 | \NAT@last@yr \@citea \mbox{\citenumfont{\NAT@num}}%
|
---|
306 | \let\NAT@last@yr\relax
|
---|
307 | \fi
|
---|
308 | \else
|
---|
309 | \@citea \mbox{\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
310 | {\citenumfont{\NAT@num}}\hyper@natlinkend}%
|
---|
311 | \fi
|
---|
312 | \fi
|
---|
313 | \def\@citea{\NAT@sep\penalty\@m\NAT@space}%
|
---|
314 | \else
|
---|
315 | \ifcase\NAT@ctype\relax
|
---|
316 | \ifx\NAT@last@nm\NAT@nm \NAT@yrsep\penalty\@m\NAT@space\else
|
---|
317 | \@citea \NAT@test{1}\ \NAT@@open
|
---|
318 | \if*#1*\else#1\ \fi\fi \NAT@mbox{%
|
---|
319 | \hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
320 | {\citenumfont{\NAT@num}}\hyper@natlinkend}%
|
---|
321 | \def\@citea{\NAT@@close\NAT@sep\penalty\@m\ }%
|
---|
322 | \or\@citea
|
---|
323 | \hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
324 | \NAT@test{\NAT@ctype}\hyper@natlinkend
|
---|
325 | \def\@citea{\NAT@sep\penalty\@m\ }%
|
---|
326 | \or\@citea
|
---|
327 | \hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
328 | \NAT@test{\NAT@ctype}\hyper@natlinkend
|
---|
329 | \def\@citea{\NAT@sep\penalty\@m\ }%
|
---|
330 | \or\@citea
|
---|
331 | \hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
332 | \NAT@alias\hyper@natlinkend
|
---|
333 | \def\@citea{\NAT@sep\penalty\@m\ }%
|
---|
334 | \fi
|
---|
335 | \fi
|
---|
336 | }}%
|
---|
337 | \ifnum\NAT@sort>1\relax\NAT@last@yr\fi
|
---|
338 | \ifNAT@swa\else\ifnum\NAT@ctype=0\if*#2*\else
|
---|
339 | \NAT@cmt#2\fi \NAT@@close\fi\fi}{#1}{#2}}
|
---|
340 | \newcommand\NAT@test[1]{\ifnum#1=1 \ifx\NAT@nm\NAT@noname
|
---|
341 | {\reset@font\bfseries(author?)}\PackageWarning{natbib}
|
---|
342 | {Author undefined for citation`\@citeb'
|
---|
343 | \MessageBreak
|
---|
344 | on page \thepage}\else \NAT@nm \fi
|
---|
345 | \else \if\relax\NAT@date\relax
|
---|
346 | {\reset@font\bfseries(year?)}\PackageWarning{natbib}
|
---|
347 | {Year undefined for citation`\@citeb'
|
---|
348 | \MessageBreak
|
---|
349 | on page \thepage}\else \NAT@date \fi \fi}
|
---|
350 | \let\citenumfont=\relax
|
---|
351 | \newcommand\NAT@citex{}
|
---|
352 | \def\NAT@citex%
|
---|
353 | [#1][#2]#3{%
|
---|
354 | \NAT@sort@cites{#3}%
|
---|
355 | \let\@citea\@empty
|
---|
356 | \@cite{\let\NAT@nm\@empty\let\NAT@year\@empty
|
---|
357 | \@for\@citeb:=\NAT@cite@list\do
|
---|
358 | {\edef\@citeb{\expandafter\@firstofone\@citeb}%
|
---|
359 | \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
|
---|
360 | \@ifundefined{b@\@citeb\@extra@b@citeb}{\@citea%
|
---|
361 | {\reset@font\bfseries ?}\NAT@citeundefined
|
---|
362 | \PackageWarning{natbib}%
|
---|
363 | {Citation `\@citeb' on page \thepage \space undefined}\def\NAT@date{}}%
|
---|
364 | {\let\NAT@last@nm=\NAT@nm\let\NAT@last@yr=\NAT@year
|
---|
365 | \NAT@parse{\@citeb}%
|
---|
366 | \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
|
---|
367 | \let\NAT@name=\NAT@all@names
|
---|
368 | \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
|
---|
369 | \fi
|
---|
370 | \ifNAT@full\let\NAT@nm\NAT@all@names\else
|
---|
371 | \let\NAT@nm\NAT@name\fi
|
---|
372 | \ifNAT@swa\ifcase\NAT@ctype
|
---|
373 | \if\relax\NAT@date\relax
|
---|
374 | \@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
375 | \NAT@nmfmt{\NAT@nm}\NAT@date\hyper@natlinkend
|
---|
376 | \else
|
---|
377 | \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
|
---|
378 | \ifx\NAT@last@yr\NAT@year
|
---|
379 | \def\NAT@temp{{?}}%
|
---|
380 | \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%
|
---|
381 | {Multiple citation on page \thepage: same authors and
|
---|
382 | year\MessageBreak without distinguishing extra
|
---|
383 | letter,\MessageBreak appears as question mark}\fi
|
---|
384 | \hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@exlab
|
---|
385 | \hyper@natlinkend
|
---|
386 | \else\unskip\
|
---|
387 | \hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@date
|
---|
388 | \hyper@natlinkend
|
---|
389 | \fi
|
---|
390 | \else\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
391 | \NAT@nmfmt{\NAT@nm}%
|
---|
392 | \hyper@natlinkbreak{\NAT@aysep\ }{\@citeb\@extra@b@citeb}%
|
---|
393 | \NAT@date\hyper@natlinkend
|
---|
394 | \fi
|
---|
395 | \fi
|
---|
396 | \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
397 | \NAT@nmfmt{\NAT@nm}\hyper@natlinkend
|
---|
398 | \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
399 | \NAT@date\hyper@natlinkend
|
---|
400 | \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
401 | \NAT@alias\hyper@natlinkend
|
---|
402 | \fi \def\@citea{\NAT@sep\ }%
|
---|
403 | \else\ifcase\NAT@ctype
|
---|
404 | \if\relax\NAT@date\relax
|
---|
405 | \@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
406 | \NAT@nmfmt{\NAT@nm}\hyper@natlinkend
|
---|
407 | \else
|
---|
408 | \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
|
---|
409 | \ifx\NAT@last@yr\NAT@year
|
---|
410 | \def\NAT@temp{{?}}%
|
---|
411 | \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%
|
---|
412 | {Multiple citation on page \thepage: same authors and
|
---|
413 | year\MessageBreak without distinguishing extra
|
---|
414 | letter,\MessageBreak appears as question mark}\fi
|
---|
415 | \hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@exlab
|
---|
416 | \hyper@natlinkend
|
---|
417 | \else\unskip\
|
---|
418 | \hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@date
|
---|
419 | \hyper@natlinkend
|
---|
420 | \fi
|
---|
421 | \else\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
422 | \NAT@nmfmt{\NAT@nm}%
|
---|
423 | \hyper@natlinkbreak{\ \NAT@@open\if*#1*\else#1\ \fi}%
|
---|
424 | {\@citeb\@extra@b@citeb}%
|
---|
425 | \NAT@date\hyper@natlinkend\fi
|
---|
426 | \fi
|
---|
427 | \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
428 | \NAT@nmfmt{\NAT@nm}\hyper@natlinkend
|
---|
429 | \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
430 | \NAT@date\hyper@natlinkend
|
---|
431 | \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
|
---|
432 | \NAT@alias\hyper@natlinkend
|
---|
433 | \fi \if\relax\NAT@date\relax\def\@citea{\NAT@sep\ }%
|
---|
434 | \else\def\@citea{\NAT@@close\NAT@sep\ }\fi
|
---|
435 | \fi
|
---|
436 | }}\ifNAT@swa\else\if*#2*\else\NAT@cmt#2\fi
|
---|
437 | \if\relax\NAT@date\relax\else\NAT@@close\fi\fi}{#1}{#2}}
|
---|
438 | \newif\ifNAT@par \NAT@partrue
|
---|
439 | \newcommand\NAT@@open{\ifNAT@par\NAT@open\fi}
|
---|
440 | \newcommand\NAT@@close{\ifNAT@par\NAT@close\fi}
|
---|
441 | \newcommand\NAT@alias{\@ifundefined{al@\@citeb\@extra@b@citeb}{%
|
---|
442 | {\reset@font\bfseries(alias?)}\PackageWarning{natbib}
|
---|
443 | {Alias undefined for citation `\@citeb'
|
---|
444 | \MessageBreak on page \thepage}}{\@nameuse{al@\@citeb\@extra@b@citeb}}}
|
---|
445 | \let\NAT@up\relax
|
---|
446 | \newcommand\NAT@Up[1]{{\let\protect\@unexpandable@protect\let~\relax
|
---|
447 | \expandafter\NAT@deftemp#1}\expandafter\NAT@UP\NAT@temp}
|
---|
448 | \newcommand\NAT@deftemp[1]{\xdef\NAT@temp{#1}}
|
---|
449 | \newcommand\NAT@UP[1]{\let\@tempa\NAT@UP\ifcat a#1\MakeUppercase{#1}%
|
---|
450 | \let\@tempa\relax\else#1\fi\@tempa}
|
---|
451 | \newcommand\shortcites[1]{%
|
---|
452 | \@bsphack\@for\@citeb:=#1\do
|
---|
453 | {\edef\@citeb{\expandafter\@firstofone\@citeb}%
|
---|
454 | \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}\@esphack}
|
---|
455 | \newcommand\NAT@biblabel[1]{\hfill}
|
---|
456 | \newcommand\NAT@biblabelnum[1]{\bibnumfmt{#1}}
|
---|
457 | \newcommand\bibnumfmt[1]{[#1]}
|
---|
458 | \def\@tempa#1{[#1]}
|
---|
459 | \ifx\@tempa\@biblabel\let\@biblabel\@empty\fi
|
---|
460 | \newcommand\NAT@bibsetnum[1]{\settowidth\labelwidth{\@biblabel{#1}}%
|
---|
461 | \setlength{\leftmargin}{\labelwidth}\addtolength{\leftmargin}{\labelsep}%
|
---|
462 | \setlength{\itemsep}{\bibsep}\setlength{\parsep}{\z@}%
|
---|
463 | \ifNAT@openbib
|
---|
464 | \addtolength{\leftmargin}{\bibindent}%
|
---|
465 | \setlength{\itemindent}{-\bibindent}%
|
---|
466 | \setlength{\listparindent}{\itemindent}%
|
---|
467 | \setlength{\parsep}{0pt}%
|
---|
468 | \fi
|
---|
469 | }
|
---|
470 | \newlength{\bibhang}
|
---|
471 | \setlength{\bibhang}{1em}
|
---|
472 | \newlength{\bibsep}
|
---|
473 | {\@listi \global\bibsep\itemsep \global\advance\bibsep by\parsep}
|
---|
474 |
|
---|
475 | \newcommand\NAT@bibsetup%
|
---|
476 | [1]{\setlength{\leftmargin}{\bibhang}\setlength{\itemindent}{-\leftmargin}%
|
---|
477 | \setlength{\itemsep}{\bibsep}\setlength{\parsep}{\z@}}
|
---|
478 | \newcommand\NAT@set@cites{\ifNAT@numbers
|
---|
479 | \ifNAT@super \let\@cite\NAT@citesuper
|
---|
480 | \def\NAT@mbox##1{\unskip\nobreak\hspace{1\p@}\textsuperscript{##1}}%
|
---|
481 | \let\citeyearpar=\citeyear
|
---|
482 | \let\NAT@space\relax\else
|
---|
483 | \let\NAT@mbox=\mbox
|
---|
484 | \let\@cite\NAT@citenum \def\NAT@space{ }\fi
|
---|
485 | \let\@citex\NAT@citexnum
|
---|
486 | \ifx\@biblabel\@empty\let\@biblabel\NAT@biblabelnum\fi
|
---|
487 | \let\@bibsetup\NAT@bibsetnum
|
---|
488 | \def\natexlab##1{}%
|
---|
489 | \else
|
---|
490 | \let\@cite\NAT@cite
|
---|
491 | \let\@citex\NAT@citex
|
---|
492 | \let\@biblabel\NAT@biblabel
|
---|
493 | \let\@bibsetup\NAT@bibsetup
|
---|
494 | \def\natexlab##1{##1}%
|
---|
495 | \fi}
|
---|
496 | \AtBeginDocument{\NAT@set@cites}
|
---|
497 | \AtBeginDocument{\ifx\SK@def\@undefined\else
|
---|
498 | \ifx\SK@cite\@empty\else
|
---|
499 | \SK@def\@citex[#1][#2]#3{\SK@\SK@@ref{#3}\SK@@citex[#1][#2]{#3}}\fi
|
---|
500 | \ifx\SK@citeauthor\@undefined\def\HAR@checkdef{}\else
|
---|
501 | \let\citeauthor\SK@citeauthor
|
---|
502 | \let\citefullauthor\SK@citefullauthor
|
---|
503 | \let\citeyear\SK@citeyear\fi
|
---|
504 | \fi}
|
---|
505 | \AtBeginDocument{\@ifpackageloaded{hyperref}{%
|
---|
506 | \ifnum\NAT@sort=2\def\NAT@sort{1}\fi}{}}
|
---|
507 | \newif\ifNAT@full\NAT@fullfalse
|
---|
508 | \newif\ifNAT@swa
|
---|
509 | \DeclareRobustCommand\citet
|
---|
510 | {\begingroup\NAT@swafalse\def\NAT@ctype{0}\NAT@partrue
|
---|
511 | \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
|
---|
512 | \newcommand\NAT@citetp{\@ifnextchar[{\NAT@@citetp}{\NAT@@citetp[]}}
|
---|
513 | \newcommand\NAT@@citetp{}
|
---|
514 | \def\NAT@@citetp[#1]{\@ifnextchar[{\@citex[#1]}{\@citex[][#1]}}
|
---|
515 | \DeclareRobustCommand\citep
|
---|
516 | {\begingroup\NAT@swatrue\def\NAT@ctype{0}\NAT@partrue
|
---|
517 | \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
|
---|
518 | \DeclareRobustCommand\cite
|
---|
519 | {\begingroup\def\NAT@ctype{0}\NAT@partrue\NAT@swatrue
|
---|
520 | \@ifstar{\NAT@fulltrue\NAT@cites}{\NAT@fullfalse\NAT@cites}}
|
---|
521 | \newcommand\NAT@cites{\@ifnextchar [{\NAT@@citetp}{%
|
---|
522 | \ifNAT@numbers\else
|
---|
523 | \NAT@swafalse
|
---|
524 | \fi
|
---|
525 | \NAT@@citetp[]}}
|
---|
526 | \DeclareRobustCommand\citealt
|
---|
527 | {\begingroup\NAT@swafalse\def\NAT@ctype{0}\NAT@parfalse
|
---|
528 | \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
|
---|
529 | \DeclareRobustCommand\citealp
|
---|
530 | {\begingroup\NAT@swatrue\def\NAT@ctype{0}\NAT@parfalse
|
---|
531 | \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
|
---|
532 | \DeclareRobustCommand\citeauthor
|
---|
533 | {\begingroup\NAT@swafalse\def\NAT@ctype{1}\NAT@parfalse
|
---|
534 | \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
|
---|
535 | \DeclareRobustCommand\Citet
|
---|
536 | {\begingroup\NAT@swafalse\def\NAT@ctype{0}\NAT@partrue
|
---|
537 | \let\NAT@up\NAT@Up
|
---|
538 | \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
|
---|
539 | \DeclareRobustCommand\Citep
|
---|
540 | {\begingroup\NAT@swatrue\def\NAT@ctype{0}\NAT@partrue
|
---|
541 | \let\NAT@up\NAT@Up
|
---|
542 | \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
|
---|
543 | \DeclareRobustCommand\Citealt
|
---|
544 | {\begingroup\NAT@swafalse\def\NAT@ctype{0}\NAT@parfalse
|
---|
545 | \let\NAT@up\NAT@Up
|
---|
546 | \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
|
---|
547 | \DeclareRobustCommand\Citealp
|
---|
548 | {\begingroup\NAT@swatrue\def\NAT@ctype{0}\NAT@parfalse
|
---|
549 | \let\NAT@up\NAT@Up
|
---|
550 | \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
|
---|
551 | \DeclareRobustCommand\Citeauthor
|
---|
552 | {\begingroup\NAT@swafalse\def\NAT@ctype{1}\NAT@parfalse
|
---|
553 | \let\NAT@up\NAT@Up
|
---|
554 | \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
|
---|
555 | \DeclareRobustCommand\citeyear
|
---|
556 | {\begingroup\NAT@swafalse\def\NAT@ctype{2}\NAT@parfalse\NAT@citetp}
|
---|
557 | \DeclareRobustCommand\citeyearpar
|
---|
558 | {\begingroup\NAT@swatrue\def\NAT@ctype{2}\NAT@partrue\NAT@citetp}
|
---|
559 | \newcommand\citetext[1]{\NAT@open#1\NAT@close}
|
---|
560 | \DeclareRobustCommand\citefullauthor
|
---|
561 | {\citeauthor*}
|
---|
562 | \newcommand\defcitealias[2]{%
|
---|
563 | \@ifundefined{al@#1\@extra@b@citeb}{}
|
---|
564 | {\PackageWarning{natbib}{Overwriting existing alias for citation #1}}
|
---|
565 | \@namedef{al@#1\@extra@b@citeb}{#2}}
|
---|
566 | \DeclareRobustCommand\citetalias{\begingroup
|
---|
567 | \NAT@swafalse\def\NAT@ctype{3}\NAT@parfalse\NAT@citetp}
|
---|
568 | \DeclareRobustCommand\citepalias{\begingroup
|
---|
569 | \NAT@swatrue\def\NAT@ctype{3}\NAT@partrue\NAT@citetp}
|
---|
570 | \renewcommand\nocite[1]{\@bsphack
|
---|
571 | \@for\@citeb:=#1\do{%
|
---|
572 | \edef\@citeb{\expandafter\@firstofone\@citeb}%
|
---|
573 | \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
|
---|
574 | \if*\@citeb\else
|
---|
575 | \@ifundefined{b@\@citeb\@extra@b@citeb}{%
|
---|
576 | \NAT@citeundefined \PackageWarning{natbib}%
|
---|
577 | {Citation `\@citeb' undefined}}{}\fi}%
|
---|
578 | \@esphack}
|
---|
579 | \newcommand\NAT@parse[1]{{%
|
---|
580 | \let\protect=\@unexpandable@protect\let~\relax
|
---|
581 | \let\active@prefix=\@gobble
|
---|
582 | \xdef\NAT@temp{\csname b@#1\@extra@b@citeb\endcsname}}%
|
---|
583 | \expandafter\NAT@split\NAT@temp
|
---|
584 | \expandafter\NAT@parse@date\NAT@date??????@@%
|
---|
585 | \ifciteindex\NAT@index\fi
|
---|
586 | }
|
---|
587 | \newcommand\NAT@split[4]{%
|
---|
588 | \gdef\NAT@num{#1}\gdef\NAT@name{#3}\gdef\NAT@date{#2}%
|
---|
589 | \gdef\NAT@all@names{#4}%
|
---|
590 | \ifx\NAT@noname\NAT@all@names \gdef\NAT@all@names{#3}\fi}
|
---|
591 | \newcommand\NAT@parse@date{}
|
---|
592 | \def\NAT@parse@date#1#2#3#4#5#6@@{%
|
---|
593 | \ifnum\the\catcode`#1=11\def\NAT@year{}\def\NAT@exlab{#1}\else
|
---|
594 | \ifnum\the\catcode`#2=11\def\NAT@year{#1}\def\NAT@exlab{#2}\else
|
---|
595 | \ifnum\the\catcode`#3=11\def\NAT@year{#1#2}\def\NAT@exlab{#3}\else
|
---|
596 | \ifnum\the\catcode`#4=11\def\NAT@year{#1#2#3}\def\NAT@exlab{#4}\else
|
---|
597 | \def\NAT@year{#1#2#3#4}\def\NAT@exlab{{#5}}\fi\fi\fi\fi}
|
---|
598 | \newcommand\NAT@index{}
|
---|
599 | \let\NAT@makeindex=\makeindex
|
---|
600 | \renewcommand\makeindex{\NAT@makeindex
|
---|
601 | \renewcommand\NAT@index{\@bsphack\begingroup
|
---|
602 | \def~{\string~}\@wrindex{\NAT@idxtxt}}}
|
---|
603 | \newcommand\NAT@idxtxt{\NAT@name\ \NAT@open\NAT@date\NAT@close}
|
---|
604 | \@ifundefined{@indexfile}{}{\let\NAT@makeindex\relax\makeindex}
|
---|
605 | \newif\ifciteindex \citeindexfalse
|
---|
606 | \newcommand\citeindextype{default}
|
---|
607 | \newcommand\NAT@index@alt{{\let\protect=\noexpand\let~\relax
|
---|
608 | \xdef\NAT@temp{\NAT@idxtxt}}\expandafter\NAT@exp\NAT@temp\@nil}
|
---|
609 | \newcommand\NAT@exp{}
|
---|
610 | \def\NAT@exp#1\@nil{\mbox{}\index[\citeindextype]{#1}}
|
---|
611 |
|
---|
612 | \AtBeginDocument{%
|
---|
613 | \@ifpackageloaded{index}{\let\NAT@index=\NAT@index@alt}{}}
|
---|
614 | \newcommand\NAT@ifcmd{\futurelet\NAT@temp\NAT@ifxcmd}
|
---|
615 | \newcommand\NAT@ifxcmd{\ifx\NAT@temp\relax\else\expandafter\NAT@bare\fi}
|
---|
616 | \def\NAT@bare#1(#2)#3(@)#4\@nil#5{%
|
---|
617 | \if @#2
|
---|
618 | \expandafter\NAT@apalk#1, , \@nil{#5}\else
|
---|
619 | \stepcounter{NAT@ctr}%
|
---|
620 | \NAT@wrout{\arabic {NAT@ctr}}{#2}{#1}{#3}{#5}
|
---|
621 | \fi
|
---|
622 | }
|
---|
623 | \newcommand\NAT@wrout[5]{%
|
---|
624 | \if@filesw
|
---|
625 | {\let\protect\noexpand\let~\relax
|
---|
626 | \immediate
|
---|
627 | \write\@auxout{\string\bibcite{#5}{{#1}{#2}{{#3}}{{#4}}}}}\fi
|
---|
628 | \ignorespaces}
|
---|
629 | \def\NAT@noname{{}}
|
---|
630 | \renewcommand\bibitem{%
|
---|
631 | \@ifnextchar[{\@lbibitem}{%
|
---|
632 | \global\NAT@stdbsttrue
|
---|
633 | \stepcounter{NAT@ctr}\@lbibitem[\arabic{NAT@ctr}]}}
|
---|
634 | \def\@lbibitem[#1]#2{%
|
---|
635 | \if\relax\@extra@b@citeb\relax\else
|
---|
636 | \@ifundefined{br@#2\@extra@b@citeb}{}{%
|
---|
637 | \@namedef{br@#2}{\@nameuse{br@#2\@extra@b@citeb}}}\fi
|
---|
638 | \@ifundefined{b@#2\@extra@b@citeb}{\def\NAT@num{}}{\NAT@parse{#2}}%
|
---|
639 | \item[\hfil\hyper@natanchorstart{#2\@extra@b@citeb}\@biblabel{\NAT@num}%
|
---|
640 | \hyper@natanchorend]%
|
---|
641 | \NAT@ifcmd#1(@)(@)\@nil{#2}}
|
---|
642 | \ifx\SK@lbibitem\@undefined\else
|
---|
643 | \let\SK@lbibitem\@lbibitem
|
---|
644 | \def\@lbibitem[#1]#2{%
|
---|
645 | \SK@lbibitem[#1]{#2}\SK@\SK@@label{#2}\ignorespaces}\fi
|
---|
646 | \newif\ifNAT@stdbst \NAT@stdbstfalse
|
---|
647 |
|
---|
648 | \AtEndDocument
|
---|
649 | {\ifNAT@stdbst\if@filesw\immediate\write\@auxout{\string
|
---|
650 | \global\string\NAT@numberstrue}\fi\fi
|
---|
651 | }
|
---|
652 | \providecommand\bibcite{}
|
---|
653 | \renewcommand\bibcite[2]{\@ifundefined{b@#1\@extra@binfo}\relax
|
---|
654 | {\NAT@citemultiple
|
---|
655 | \PackageWarningNoLine{natbib}{Citation `#1' multiply defined}}%
|
---|
656 | \global\@namedef{b@#1\@extra@binfo}{#2}}
|
---|
657 | \AtEndDocument{\NAT@swatrue\let\bibcite\NAT@testdef}
|
---|
658 | \newcommand\NAT@testdef[2]{%
|
---|
659 | \def\NAT@temp{#2}\expandafter \ifx \csname b@#1\@extra@binfo\endcsname
|
---|
660 | \NAT@temp \else \ifNAT@swa \NAT@swafalse
|
---|
661 | \PackageWarningNoLine{natbib}{Citation(s) may have
|
---|
662 | changed.\MessageBreak
|
---|
663 | Rerun to get citations correct}\fi\fi}
|
---|
664 | \newcommand\NAT@apalk{}
|
---|
665 | \def\NAT@apalk#1, #2, #3\@nil#4{\if\relax#2\relax
|
---|
666 | \global\NAT@stdbsttrue
|
---|
667 | \NAT@wrout{#1}{}{}{}{#4}\else
|
---|
668 | \stepcounter{NAT@ctr}%
|
---|
669 | \NAT@wrout{\arabic {NAT@ctr}}{#2}{#1}{}{#4}\fi}
|
---|
670 | \newcommand\citeauthoryear{}
|
---|
671 | \def\citeauthoryear#1#2#3(@)(@)\@nil#4{\stepcounter{NAT@ctr}\if\relax#3\relax
|
---|
672 | \NAT@wrout{\arabic {NAT@ctr}}{#2}{#1}{}{#4}\else
|
---|
673 | \NAT@wrout{\arabic {NAT@ctr}}{#3}{#2}{#1}{#4}\fi}
|
---|
674 | \newcommand\citestarts{\NAT@open}
|
---|
675 | \newcommand\citeends{\NAT@close}
|
---|
676 | \newcommand\betweenauthors{and}
|
---|
677 | \newcommand\astroncite{}
|
---|
678 | \def\astroncite#1#2(@)(@)\@nil#3{\stepcounter{NAT@ctr}\NAT@wrout{\arabic
|
---|
679 | {NAT@ctr}}{#2}{#1}{}{#3}}
|
---|
680 | \newcommand\citename{}
|
---|
681 | \def\citename#1#2(@)(@)\@nil#3{\expandafter\NAT@apalk#1#2, \@nil{#3}}
|
---|
682 | \newcommand\harvarditem[4][]%
|
---|
683 | {\if\relax#1\relax\bibitem[#2(#3)]{#4}\else
|
---|
684 | \bibitem[#1(#3)#2]{#4}\fi }
|
---|
685 | \newcommand\harvardleft{\NAT@open}
|
---|
686 | \newcommand\harvardright{\NAT@close}
|
---|
687 | \newcommand\harvardyearleft{\NAT@open}
|
---|
688 | \newcommand\harvardyearright{\NAT@close}
|
---|
689 | \AtBeginDocument{\providecommand{\harvardand}{and}}
|
---|
690 | \newcommand\harvardurl[1]{\textbf{URL:} \textit{#1}}
|
---|
691 | \providecommand\bibsection{}
|
---|
692 | \@ifundefined{chapter}%
|
---|
693 | {\renewcommand\bibsection{\section*{\refname
|
---|
694 | \@mkboth{\MakeUppercase{\refname}}{\MakeUppercase{\refname}}}}}
|
---|
695 | {\@ifundefined{NAT@sectionbib}%
|
---|
696 | {\renewcommand\bibsection{\chapter*{\bibname
|
---|
697 | \@mkboth{\MakeUppercase{\bibname}}{\MakeUppercase{\bibname}}}}}
|
---|
698 | {\renewcommand\bibsection{\section*{\bibname
|
---|
699 | \ifx\@mkboth\@gobbletwo\else\markright{\MakeUppercase{\bibname}}\fi}}}}
|
---|
700 | \@ifclassloaded{amsart}%
|
---|
701 | {\renewcommand\bibsection{\section*{\refname}}}{}
|
---|
702 | \@ifclassloaded{amsbook}%
|
---|
703 | {\renewcommand\bibsection{\chapter*{\bibname}}}{}
|
---|
704 | \@ifundefined{bib@heading}{}{\let\bibsection\bib@heading}
|
---|
705 | \newcounter{NAT@ctr}
|
---|
706 | \renewenvironment{thebibliography}[1]{%
|
---|
707 | \bibsection\parindent \z@\bibpreamble\bibfont\list
|
---|
708 | {\@biblabel{\arabic{NAT@ctr}}}{\@bibsetup{#1}%
|
---|
709 | \setcounter{NAT@ctr}{0}}%
|
---|
710 | \ifNAT@openbib
|
---|
711 | \renewcommand\newblock{\par}
|
---|
712 | \else
|
---|
713 | \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
|
---|
714 | \fi
|
---|
715 | \sloppy\clubpenalty4000\widowpenalty4000
|
---|
716 | \sfcode`\.=1000\relax
|
---|
717 | \let\citeN\cite \let\shortcite\cite
|
---|
718 | \let\citeasnoun\cite
|
---|
719 | }{\def\@noitemerr{%
|
---|
720 | \PackageWarning{natbib}
|
---|
721 | {Empty `thebibliography' environment}}%
|
---|
722 | \endlist\vskip-\lastskip}
|
---|
723 | \let\bibfont\relax
|
---|
724 | \let\bibpreamble\relax
|
---|
725 | \providecommand\reset@font{\relax}
|
---|
726 | \providecommand\bibname{Bibliography}
|
---|
727 | \providecommand\refname{References}
|
---|
728 | \newcommand\NAT@citeundefined{\gdef \NAT@undefined {%
|
---|
729 | \PackageWarningNoLine{natbib}{There were undefined citations}}}
|
---|
730 | \let \NAT@undefined \relax
|
---|
731 | \newcommand\NAT@citemultiple{\gdef \NAT@multiple {%
|
---|
732 | \PackageWarningNoLine{natbib}{There were multiply defined citations}}}
|
---|
733 | \let \NAT@multiple \relax
|
---|
734 | \AtEndDocument{\NAT@undefined\NAT@multiple}
|
---|
735 | \providecommand\@mkboth[2]{}
|
---|
736 | \providecommand\MakeUppercase{\uppercase}
|
---|
737 | \providecommand{\@extra@b@citeb}{}
|
---|
738 | \gdef\@extra@binfo{}
|
---|
739 | \providecommand\hyper@natanchorstart[1]{}
|
---|
740 | \providecommand\hyper@natanchorend{}
|
---|
741 | \providecommand\hyper@natlinkstart[1]{}
|
---|
742 | \providecommand\hyper@natlinkend{}
|
---|
743 | \providecommand\hyper@natlinkbreak[2]{#1}
|
---|
744 | \@ifundefined{bbl@redefine}{}{%
|
---|
745 | \bbl@redefine\nocite#1{%
|
---|
746 | \@safe@activestrue\org@nocite{#1}\@safe@activesfalse}%
|
---|
747 | \bbl@redefine\@lbibitem[#1]#2{%
|
---|
748 | \@safe@activestrue\org@@lbibitem[#1]{#2}\@safe@activesfalse}%
|
---|
749 | }
|
---|
750 | \AtBeginDocument{\@ifundefined{bbl@redefine}{}{%
|
---|
751 | \bbl@redefine\@citex[#1][#2]#3{%
|
---|
752 | \@safe@activestrue\org@@citex[#1][#2]{#3}\@safe@activesfalse}%
|
---|
753 | \bbl@redefine\NAT@testdef#1#2{%
|
---|
754 | \@safe@activestrue\org@NAT@testdef{#1}{#2}\@safe@activesfalse}%
|
---|
755 | \@ifundefined{org@@lbibitem}{%
|
---|
756 | \bbl@redefine\@lbibitem[#1]#2{%
|
---|
757 | \@safe@activestrue\org@@lbibitem[#1]{#2}\@safe@activesfalse}}{}%
|
---|
758 | }}
|
---|
759 | \ifnum\NAT@sort>0
|
---|
760 | \newcommand\NAT@sort@cites[1]{%
|
---|
761 | \@tempcntb\m@ne
|
---|
762 | \let\@celt\delimiter
|
---|
763 | \def\NAT@num@list{}%
|
---|
764 | \def\NAT@cite@list{}%
|
---|
765 | \def\NAT@nonsort@list{}%
|
---|
766 | \@for \@citeb:=#1\do{\NAT@make@cite@list}%
|
---|
767 | \edef\NAT@cite@list{\NAT@cite@list\NAT@nonsort@list}%
|
---|
768 | \edef\NAT@cite@list{\expandafter\NAT@xcom\NAT@cite@list @@}}
|
---|
769 | \begingroup \catcode`\_=8
|
---|
770 | \gdef\NAT@make@cite@list{%
|
---|
771 | \edef\@citeb{\expandafter\@firstofone\@citeb}%
|
---|
772 | \@ifundefined{b@\@citeb\@extra@b@citeb}{\def\NAT@num{A}}%
|
---|
773 | {\NAT@parse{\@citeb}}%
|
---|
774 | \ifcat _\ifnum\z@<0\NAT@num _\else A\fi
|
---|
775 | \@tempcnta\NAT@num \relax
|
---|
776 | \ifnum \@tempcnta>\@tempcntb
|
---|
777 | \edef\NAT@num@list{\NAT@num@list \@celt{\NAT@num}}%
|
---|
778 | \edef\NAT@cite@list{\NAT@cite@list\@citeb,}%
|
---|
779 | \@tempcntb\@tempcnta
|
---|
780 | \else
|
---|
781 | \let\NAT@@cite@list=\NAT@cite@list \def\NAT@cite@list{}%
|
---|
782 | \edef\NAT@num@list{\expandafter\NAT@num@celt \NAT@num@list \@gobble @}%
|
---|
783 | {\let\@celt=\NAT@celt\NAT@num@list}%
|
---|
784 | \fi
|
---|
785 | \else
|
---|
786 | \edef\NAT@nonsort@list{\NAT@nonsort@list\@citeb,}%
|
---|
787 | \fi}
|
---|
788 | \endgroup
|
---|
789 | \def\NAT@celt#1{\ifnum #1<\@tempcnta
|
---|
790 | \xdef\NAT@cite@list{\NAT@cite@list\expandafter\NAT@nextc\NAT@@cite@list @@}%
|
---|
791 | \xdef\NAT@@cite@list{\expandafter\NAT@restc\NAT@@cite@list}%
|
---|
792 | \else
|
---|
793 | \xdef\NAT@cite@list{\NAT@cite@list\@citeb,\NAT@@cite@list}\let\@celt\@gobble%
|
---|
794 | \fi}
|
---|
795 | \def\NAT@num@celt#1#2{\ifx \@celt #1%
|
---|
796 | \ifnum #2<\@tempcnta
|
---|
797 | \@celt{#2}%
|
---|
798 | \expandafter\expandafter\expandafter\NAT@num@celt
|
---|
799 | \else
|
---|
800 | \@celt{\number\@tempcnta}\@celt{#2}%
|
---|
801 | \fi\fi}
|
---|
802 | \def\NAT@nextc#1,#2@@{#1,}
|
---|
803 | \def\NAT@restc#1,#2{#2}
|
---|
804 | \def\NAT@xcom#1,@@{#1}
|
---|
805 | \else
|
---|
806 | \newcommand\NAT@sort@cites[1]{\edef\NAT@cite@list{#1}}\fi
|
---|
807 | \InputIfFileExists{natbib.cfg}
|
---|
808 | {\typeout{Local config file natbib.cfg used}}{}
|
---|
809 | %%
|
---|
810 | %% <<<<< End of generated file <<<<<<
|
---|
811 | %%
|
---|
812 | %% End of file `natbib.sty'.
|
---|