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