minimap2 0.2.22.0 → 0.2.24.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +60 -76
  3. data/ext/Rakefile +55 -0
  4. data/ext/cmappy/cmappy.c +129 -0
  5. data/ext/cmappy/cmappy.h +44 -0
  6. data/ext/minimap2/FAQ.md +46 -0
  7. data/ext/minimap2/LICENSE.txt +24 -0
  8. data/ext/minimap2/MANIFEST.in +10 -0
  9. data/ext/minimap2/Makefile +132 -0
  10. data/ext/minimap2/Makefile.simde +97 -0
  11. data/ext/minimap2/NEWS.md +821 -0
  12. data/ext/minimap2/README.md +403 -0
  13. data/ext/minimap2/align.c +1020 -0
  14. data/ext/minimap2/bseq.c +169 -0
  15. data/ext/minimap2/bseq.h +64 -0
  16. data/ext/minimap2/code_of_conduct.md +30 -0
  17. data/ext/minimap2/cookbook.md +243 -0
  18. data/ext/minimap2/esterr.c +64 -0
  19. data/ext/minimap2/example.c +63 -0
  20. data/ext/minimap2/format.c +559 -0
  21. data/ext/minimap2/hit.c +466 -0
  22. data/ext/minimap2/index.c +775 -0
  23. data/ext/minimap2/kalloc.c +205 -0
  24. data/ext/minimap2/kalloc.h +76 -0
  25. data/ext/minimap2/kdq.h +132 -0
  26. data/ext/minimap2/ketopt.h +120 -0
  27. data/ext/minimap2/khash.h +615 -0
  28. data/ext/minimap2/krmq.h +474 -0
  29. data/ext/minimap2/kseq.h +256 -0
  30. data/ext/minimap2/ksort.h +153 -0
  31. data/ext/minimap2/ksw2.h +184 -0
  32. data/ext/minimap2/ksw2_dispatch.c +96 -0
  33. data/ext/minimap2/ksw2_extd2_sse.c +402 -0
  34. data/ext/minimap2/ksw2_exts2_sse.c +416 -0
  35. data/ext/minimap2/ksw2_extz2_sse.c +313 -0
  36. data/ext/minimap2/ksw2_ll_sse.c +152 -0
  37. data/ext/minimap2/kthread.c +159 -0
  38. data/ext/minimap2/kthread.h +15 -0
  39. data/ext/minimap2/kvec.h +105 -0
  40. data/ext/minimap2/lchain.c +369 -0
  41. data/ext/minimap2/main.c +459 -0
  42. data/ext/minimap2/map.c +714 -0
  43. data/ext/minimap2/minimap.h +410 -0
  44. data/ext/minimap2/minimap2.1 +725 -0
  45. data/ext/minimap2/misc/README.md +179 -0
  46. data/ext/minimap2/misc/mmphase.js +335 -0
  47. data/ext/minimap2/misc/paftools.js +3149 -0
  48. data/ext/minimap2/misc.c +162 -0
  49. data/ext/minimap2/mmpriv.h +132 -0
  50. data/ext/minimap2/options.c +234 -0
  51. data/ext/minimap2/pe.c +177 -0
  52. data/ext/minimap2/python/README.rst +196 -0
  53. data/ext/minimap2/python/cmappy.h +152 -0
  54. data/ext/minimap2/python/cmappy.pxd +153 -0
  55. data/ext/minimap2/python/mappy.pyx +273 -0
  56. data/ext/minimap2/python/minimap2.py +39 -0
  57. data/ext/minimap2/sdust.c +213 -0
  58. data/ext/minimap2/sdust.h +25 -0
  59. data/ext/minimap2/seed.c +131 -0
  60. data/ext/minimap2/setup.py +55 -0
  61. data/ext/minimap2/sketch.c +143 -0
  62. data/ext/minimap2/splitidx.c +84 -0
  63. data/ext/minimap2/sse2neon/emmintrin.h +1689 -0
  64. data/ext/minimap2/test/MT-human.fa +278 -0
  65. data/ext/minimap2/test/MT-orang.fa +276 -0
  66. data/ext/minimap2/test/q-inv.fa +4 -0
  67. data/ext/minimap2/test/q2.fa +2 -0
  68. data/ext/minimap2/test/t-inv.fa +127 -0
  69. data/ext/minimap2/test/t2.fa +2 -0
  70. data/ext/minimap2/tex/Makefile +21 -0
  71. data/ext/minimap2/tex/bioinfo.cls +930 -0
  72. data/ext/minimap2/tex/blasr-mc.eval +17 -0
  73. data/ext/minimap2/tex/bowtie2-s3.sam.eval +28 -0
  74. data/ext/minimap2/tex/bwa-s3.sam.eval +52 -0
  75. data/ext/minimap2/tex/bwa.eval +55 -0
  76. data/ext/minimap2/tex/eval2roc.pl +33 -0
  77. data/ext/minimap2/tex/graphmap.eval +4 -0
  78. data/ext/minimap2/tex/hs38-simu.sh +10 -0
  79. data/ext/minimap2/tex/minialign.eval +49 -0
  80. data/ext/minimap2/tex/minimap2.bib +460 -0
  81. data/ext/minimap2/tex/minimap2.tex +724 -0
  82. data/ext/minimap2/tex/mm2-s3.sam.eval +62 -0
  83. data/ext/minimap2/tex/mm2-update.tex +240 -0
  84. data/ext/minimap2/tex/mm2.approx.eval +12 -0
  85. data/ext/minimap2/tex/mm2.eval +13 -0
  86. data/ext/minimap2/tex/natbib.bst +1288 -0
  87. data/ext/minimap2/tex/natbib.sty +803 -0
  88. data/ext/minimap2/tex/ngmlr.eval +38 -0
  89. data/ext/minimap2/tex/roc.gp +60 -0
  90. data/ext/minimap2/tex/snap-s3.sam.eval +62 -0
  91. data/ext/minimap2.patch +19 -0
  92. data/lib/minimap2/aligner.rb +4 -4
  93. data/lib/minimap2/alignment.rb +11 -11
  94. data/lib/minimap2/ffi/constants.rb +20 -16
  95. data/lib/minimap2/ffi/functions.rb +5 -0
  96. data/lib/minimap2/ffi.rb +4 -5
  97. data/lib/minimap2/version.rb +2 -2
  98. data/lib/minimap2.rb +51 -15
  99. metadata +97 -79
  100. data/lib/minimap2/ffi_helper.rb +0 -53
  101. data/vendor/libminimap2.so +0 -0
@@ -0,0 +1,803 @@
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-2000 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
+ [2000/07/24 7.0a (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\hspace{1\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
+ \hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@exlab
380
+ \hyper@natlinkend
381
+ \else\unskip\
382
+ \hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@date
383
+ \hyper@natlinkend
384
+ \fi
385
+ \else\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
386
+ \NAT@nmfmt{\NAT@nm}%
387
+ \hyper@natlinkbreak{\NAT@aysep\ }{\@citeb\@extra@b@citeb}%
388
+ \NAT@date\hyper@natlinkend
389
+ \fi
390
+ \fi
391
+ \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
392
+ \NAT@nmfmt{\NAT@nm}\hyper@natlinkend
393
+ \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
394
+ \NAT@date\hyper@natlinkend
395
+ \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
396
+ \NAT@alias\hyper@natlinkend
397
+ \fi \def\@citea{\NAT@sep\ }%
398
+ \else\ifcase\NAT@ctype
399
+ \if\relax\NAT@date\relax
400
+ \@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
401
+ \NAT@nmfmt{\NAT@nm}\hyper@natlinkend
402
+ \else
403
+ \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
404
+ \ifx\NAT@last@yr\NAT@year
405
+ \hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@exlab
406
+ \hyper@natlinkend
407
+ \else\unskip\
408
+ \hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@date
409
+ \hyper@natlinkend
410
+ \fi
411
+ \else\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
412
+ \NAT@nmfmt{\NAT@nm}%
413
+ \hyper@natlinkbreak{\ \NAT@@open\if*#1*\else#1\ \fi}%
414
+ {\@citeb\@extra@b@citeb}%
415
+ \NAT@date\hyper@natlinkend\fi
416
+ \fi
417
+ \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
418
+ \NAT@nmfmt{\NAT@nm}\hyper@natlinkend
419
+ \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
420
+ \NAT@date\hyper@natlinkend
421
+ \or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
422
+ \NAT@alias\hyper@natlinkend
423
+ \fi \if\relax\NAT@date\relax\def\@citea{\NAT@sep\ }%
424
+ \else\def\@citea{\NAT@@close\NAT@sep\ }\fi
425
+ \fi
426
+ }}\ifNAT@swa\else\if*#2*\else\NAT@cmt#2\fi
427
+ \if\relax\NAT@date\relax\else\NAT@@close\fi\fi}{#1}{#2}}
428
+ \newif\ifNAT@par \NAT@partrue
429
+ \newcommand\NAT@@open{\ifNAT@par\NAT@open\fi}
430
+ \newcommand\NAT@@close{\ifNAT@par\NAT@close\fi}
431
+ \newcommand\NAT@alias{\@ifundefined{al@\@citeb\@extra@b@citeb}{%
432
+ {\reset@font\bfseries(alias?)}\PackageWarning{natbib}
433
+ {Alias undefined for citation `\@citeb'
434
+ \MessageBreak on page \thepage}}{\@nameuse{al@\@citeb\@extra@b@citeb}}}
435
+ \let\NAT@up\relax
436
+ \newcommand\NAT@Up[1]{{\let\protect\@unexpandable@protect\let~\relax
437
+ \expandafter\NAT@deftemp#1}\expandafter\NAT@UP\NAT@temp}
438
+ \newcommand\NAT@deftemp[1]{\xdef\NAT@temp{#1}}
439
+ \newcommand\NAT@UP[1]{\let\@tempa\NAT@UP\ifcat a#1\MakeUppercase{#1}%
440
+ \let\@tempa\relax\else#1\fi\@tempa}
441
+ \newcommand\shortcites[1]{%
442
+ \@bsphack\@for\@citeb:=#1\do
443
+ {\edef\@citeb{\expandafter\@firstofone\@citeb}%
444
+ \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}\@esphack}
445
+ \newcommand\NAT@biblabel[1]{\hfill}
446
+ \newcommand\NAT@biblabelnum[1]{\bibnumfmt{#1}}
447
+ \newcommand\bibnumfmt[1]{[#1]}
448
+ \def\@tempa#1{[#1]}
449
+ \ifx\@tempa\@biblabel\let\@biblabel\@empty\fi
450
+ \newcommand\NAT@bibsetnum[1]{\settowidth\labelwidth{\@biblabel{#1}}%
451
+ \setlength{\leftmargin}{\labelwidth}\addtolength{\leftmargin}{\labelsep}%
452
+ \setlength{\itemsep}{\bibsep}\setlength{\parsep}{\z@}%
453
+ \ifNAT@openbib
454
+ \addtolength{\leftmargin}{4mm}%
455
+ \setlength{\itemindent}{-4mm}%
456
+ \setlength{\listparindent}{\itemindent}%
457
+ \setlength{\parsep}{0pt}%
458
+ \fi
459
+ }
460
+ \newlength{\bibhang}
461
+ \setlength{\bibhang}{1em}
462
+ \newlength{\bibsep}
463
+ {\@listi \global\bibsep\itemsep \global\advance\bibsep by\parsep}
464
+
465
+ \newcommand\NAT@bibsetup%
466
+ [1]{\setlength{\leftmargin}{\bibhang}\setlength{\itemindent}{-\leftmargin}%
467
+ \setlength{\itemsep}{\bibsep}\setlength{\parsep}{\z@}}
468
+ \newcommand\NAT@set@cites{\ifNAT@numbers
469
+ \ifNAT@super \let\@cite\NAT@citesuper
470
+ \def\NAT@mbox##1{\unskip\nobreak\hspace{1\p@}\textsuperscript{##1}}%
471
+ \let\citeyearpar=\citeyear
472
+ \let\NAT@space\relax\else
473
+ \let\NAT@mbox=\mbox
474
+ \let\@cite\NAT@citenum \def\NAT@space{ }\fi
475
+ \let\@citex\NAT@citexnum
476
+ \ifx\@biblabel\@empty\let\@biblabel\NAT@biblabelnum\fi
477
+ \let\@bibsetup\NAT@bibsetnum
478
+ \def\natexlab##1{}%
479
+ \else
480
+ \let\@cite\NAT@cite
481
+ \let\@citex\NAT@citex
482
+ \let\@biblabel\NAT@biblabel
483
+ \let\@bibsetup\NAT@bibsetup
484
+ \def\natexlab##1{##1}%
485
+ \fi}
486
+ \AtBeginDocument{\NAT@set@cites}
487
+ \AtBeginDocument{\ifx\SK@def\@undefined\else
488
+ \ifx\SK@cite\@empty\else
489
+ \SK@def\@citex[#1][#2]#3{\SK@\SK@@ref{#3}\SK@@citex[#1][#2]{#3}}\fi
490
+ \ifx\SK@citeauthor\@undefined\def\HAR@checkdef{}\else
491
+ \let\citeauthor\SK@citeauthor
492
+ \let\citefullauthor\SK@citefullauthor
493
+ \let\citeyear\SK@citeyear\fi
494
+ \fi}
495
+ \AtBeginDocument{\@ifpackageloaded{hyperref}{%
496
+ \ifnum\NAT@sort=2\def\NAT@sort{1}\fi}{}}
497
+ \newif\ifNAT@full\NAT@fullfalse
498
+ \newif\ifNAT@swa
499
+ \DeclareRobustCommand\citet
500
+ {\begingroup\NAT@swafalse\def\NAT@ctype{0}\NAT@partrue
501
+ \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
502
+ \newcommand\NAT@citetp{\@ifnextchar[{\NAT@@citetp}{\NAT@@citetp[]}}
503
+ \newcommand\NAT@@citetp{}
504
+ \def\NAT@@citetp[#1]{\@ifnextchar[{\@citex[#1]}{\@citex[][#1]}}
505
+ \DeclareRobustCommand\citep
506
+ {\begingroup\NAT@swatrue\def\NAT@ctype{0}\NAT@partrue
507
+ \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
508
+ \DeclareRobustCommand\cite
509
+ {\begingroup\def\NAT@ctype{0}\NAT@partrue\NAT@swatrue
510
+ \@ifstar{\NAT@fulltrue\NAT@cites}{\NAT@fullfalse\NAT@cites}}
511
+ \newcommand\NAT@cites{\@ifnextchar [{\NAT@@citetp}{%
512
+ \ifNAT@numbers\else
513
+ \NAT@swafalse
514
+ \fi
515
+ \NAT@@citetp[]}}
516
+ \DeclareRobustCommand\citealt
517
+ {\begingroup\NAT@swafalse\def\NAT@ctype{0}\NAT@parfalse
518
+ \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
519
+ \DeclareRobustCommand\citealp
520
+ {\begingroup\NAT@swatrue\def\NAT@ctype{0}\NAT@parfalse
521
+ \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
522
+ \DeclareRobustCommand\citeauthor
523
+ {\begingroup\NAT@swafalse\def\NAT@ctype{1}\NAT@parfalse
524
+ \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
525
+ \DeclareRobustCommand\Citet
526
+ {\begingroup\NAT@swafalse\def\NAT@ctype{0}\NAT@partrue
527
+ \let\NAT@up\NAT@Up
528
+ \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
529
+ \DeclareRobustCommand\Citep
530
+ {\begingroup\NAT@swatrue\def\NAT@ctype{0}\NAT@partrue
531
+ \let\NAT@up\NAT@Up
532
+ \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
533
+ \DeclareRobustCommand\Citealt
534
+ {\begingroup\NAT@swafalse\def\NAT@ctype{0}\NAT@parfalse
535
+ \let\NAT@up\NAT@Up
536
+ \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
537
+ \DeclareRobustCommand\Citealp
538
+ {\begingroup\NAT@swatrue\def\NAT@ctype{0}\NAT@parfalse
539
+ \let\NAT@up\NAT@Up
540
+ \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
541
+ \DeclareRobustCommand\Citeauthor
542
+ {\begingroup\NAT@swafalse\def\NAT@ctype{1}\NAT@parfalse
543
+ \let\NAT@up\NAT@Up
544
+ \@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
545
+ \DeclareRobustCommand\citeyear
546
+ {\begingroup\NAT@swafalse\def\NAT@ctype{2}\NAT@parfalse\NAT@citetp}
547
+ \DeclareRobustCommand\citeyearpar
548
+ {\begingroup\NAT@swatrue\def\NAT@ctype{2}\NAT@partrue\NAT@citetp}
549
+ \newcommand\citetext[1]{\NAT@open#1\NAT@close}
550
+ \DeclareRobustCommand\citefullauthor
551
+ {\citeauthor*}
552
+ \newcommand\defcitealias[2]{%
553
+ \@ifundefined{al@#1\@extra@b@citeb}{}
554
+ {\PackageWarning{natbib}{Overwriting existing alias for citation #1}}
555
+ \@namedef{al@#1\@extra@b@citeb}{#2}}
556
+ \DeclareRobustCommand\citetalias{\begingroup
557
+ \NAT@swafalse\def\NAT@ctype{3}\NAT@parfalse\NAT@citetp}
558
+ \DeclareRobustCommand\citepalias{\begingroup
559
+ \NAT@swatrue\def\NAT@ctype{3}\NAT@partrue\NAT@citetp}
560
+ \renewcommand\nocite[1]{\@bsphack
561
+ \@for\@citeb:=#1\do{%
562
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
563
+ \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
564
+ \if*\@citeb\else
565
+ \@ifundefined{b@\@citeb\@extra@b@citeb}{%
566
+ \NAT@citeundefined \PackageWarning{natbib}%
567
+ {Citation `\@citeb' undefined}}{}\fi}%
568
+ \@esphack}
569
+ \newcommand\NAT@parse[1]{{%
570
+ \let\protect=\@unexpandable@protect\let~\relax
571
+ \let\active@prefix=\@gobble
572
+ \xdef\NAT@temp{\csname b@#1\@extra@b@citeb\endcsname}}%
573
+ \expandafter\NAT@split\NAT@temp
574
+ \expandafter\NAT@parse@date\NAT@date??????@@%
575
+ \ifciteindex\NAT@index\fi
576
+ }
577
+ \newcommand\NAT@split[4]{%
578
+ \gdef\NAT@num{#1}\gdef\NAT@name{#3}\gdef\NAT@date{#2}%
579
+ \gdef\NAT@all@names{#4}%
580
+ \ifx\NAT@noname\NAT@all@names \gdef\NAT@all@names{#3}\fi}
581
+ \newcommand\NAT@parse@date{}
582
+ \def\NAT@parse@date#1#2#3#4#5#6@@{%
583
+ \ifnum\the\catcode`#1=11\def\NAT@year{}\def\NAT@exlab{#1}\else
584
+ \ifnum\the\catcode`#2=11\def\NAT@year{#1}\def\NAT@exlab{#2}\else
585
+ \ifnum\the\catcode`#3=11\def\NAT@year{#1#2}\def\NAT@exlab{#3}\else
586
+ \ifnum\the\catcode`#4=11\def\NAT@year{#1#2#3}\def\NAT@exlab{#4}\else
587
+ \def\NAT@year{#1#2#3#4}\def\NAT@exlab{{#5}}\fi\fi\fi\fi}
588
+ \newcommand\NAT@index{}
589
+ \let\NAT@makeindex=\makeindex
590
+ \renewcommand\makeindex{\NAT@makeindex
591
+ \renewcommand\NAT@index{\@bsphack\begingroup
592
+ \def~{\string~}\@wrindex{\NAT@idxtxt}}}
593
+ \newcommand\NAT@idxtxt{\NAT@name\ \NAT@open\NAT@date\NAT@close}
594
+ \@ifundefined{@indexfile}{}{\let\NAT@makeindex\relax\makeindex}
595
+ \newif\ifciteindex \citeindexfalse
596
+ \newcommand\citeindextype{default}
597
+ \newcommand\NAT@index@alt{{\let\protect=\noexpand\let~\relax
598
+ \xdef\NAT@temp{\NAT@idxtxt}}\expandafter\NAT@exp\NAT@temp\@nil}
599
+ \newcommand\NAT@exp{}
600
+ \def\NAT@exp#1\@nil{\mbox{}\index[\citeindextype]{#1}}
601
+
602
+ \AtBeginDocument{%
603
+ \@ifpackageloaded{index}{\let\NAT@index=\NAT@index@alt}{}}
604
+ \newcommand\NAT@ifcmd{\futurelet\NAT@temp\NAT@ifxcmd}
605
+ \newcommand\NAT@ifxcmd{\ifx\NAT@temp\relax\else\expandafter\NAT@bare\fi}
606
+ \def\NAT@bare#1(#2)#3(@)#4\@nil#5{%
607
+ \if @#2
608
+ \expandafter\NAT@apalk#1, , \@nil{#5}\else
609
+ \stepcounter{NAT@ctr}%
610
+ \NAT@wrout{\arabic {NAT@ctr}}{#2}{#1}{#3}{#5}
611
+ \fi
612
+ }
613
+ \newcommand\NAT@wrout[5]{%
614
+ \if@filesw
615
+ {\let\protect\noexpand\let~\relax
616
+ \immediate
617
+ \write\@auxout{\string\bibcite{#5}{{#1}{#2}{{#3}}{{#4}}}}}\fi
618
+ \ignorespaces}
619
+ \def\NAT@noname{{}}
620
+ \renewcommand\bibitem{%
621
+ \@ifnextchar[{\@lbibitem}{%
622
+ \global\NAT@stdbsttrue
623
+ \stepcounter{NAT@ctr}\@lbibitem[\arabic{NAT@ctr}]}}
624
+ \def\@lbibitem[#1]#2{%
625
+ \if\relax\@extra@b@citeb\relax\else
626
+ \@ifundefined{br@#2\@extra@b@citeb}{}{%
627
+ \@namedef{br@#2}{\@nameuse{br@#2\@extra@b@citeb}}}\fi
628
+ \@ifundefined{b@#2\@extra@b@citeb}{\def\NAT@num{}}{\NAT@parse{#2}}%
629
+ \item[\hfil\hyper@natanchorstart{#2\@extra@b@citeb}\@biblabel{\NAT@num}%
630
+ \hyper@natanchorend]%
631
+ \NAT@ifcmd#1(@)(@)\@nil{#2}}
632
+ \ifx\SK@lbibitem\@undefined\else
633
+ \let\SK@lbibitem\@lbibitem
634
+ \def\@lbibitem[#1]#2{%
635
+ \SK@lbibitem[#1]{#2}\SK@\SK@@label{#2}\ignorespaces}\fi
636
+ \newif\ifNAT@stdbst \NAT@stdbstfalse
637
+
638
+ \AtEndDocument
639
+ {\ifNAT@stdbst\if@filesw\immediate\write\@auxout{\string
640
+ \global\string\NAT@numberstrue}\fi\fi
641
+ }
642
+ \providecommand\bibcite{}
643
+ \renewcommand\bibcite[2]{\@ifundefined{b@#1\@extra@binfo}\relax
644
+ {\NAT@citemultiple
645
+ \PackageWarningNoLine{natbib}{Citation `#1' multiply defined}}%
646
+ \global\@namedef{b@#1\@extra@binfo}{#2}}
647
+ \AtEndDocument{\NAT@swatrue\let\bibcite\NAT@testdef}
648
+ \newcommand\NAT@testdef[2]{%
649
+ \def\NAT@temp{#2}\expandafter \ifx \csname b@#1\@extra@binfo\endcsname
650
+ \NAT@temp \else \ifNAT@swa \NAT@swafalse
651
+ \PackageWarningNoLine{natbib}{Citation(s) may have
652
+ changed.\MessageBreak
653
+ Rerun to get citations correct}\fi\fi}
654
+ \newcommand\NAT@apalk{}
655
+ \def\NAT@apalk#1, #2, #3\@nil#4{\if\relax#2\relax
656
+ \global\NAT@stdbsttrue
657
+ \NAT@wrout{#1}{}{}{}{#4}\else
658
+ \stepcounter{NAT@ctr}%
659
+ \NAT@wrout{\arabic {NAT@ctr}}{#2}{#1}{}{#4}\fi}
660
+ \newcommand\citeauthoryear{}
661
+ \def\citeauthoryear#1#2#3(@)(@)\@nil#4{\stepcounter{NAT@ctr}\if\relax#3\relax
662
+ \NAT@wrout{\arabic {NAT@ctr}}{#2}{#1}{}{#4}\else
663
+ \NAT@wrout{\arabic {NAT@ctr}}{#3}{#2}{#1}{#4}\fi}
664
+ \newcommand\citestarts{\NAT@open}
665
+ \newcommand\citeends{\NAT@close}
666
+ \newcommand\betweenauthors{and}
667
+ \newcommand\astroncite{}
668
+ \def\astroncite#1#2(@)(@)\@nil#3{\stepcounter{NAT@ctr}\NAT@wrout{\arabic
669
+ {NAT@ctr}}{#2}{#1}{}{#3}}
670
+ \newcommand\citename{}
671
+ \def\citename#1#2(@)(@)\@nil#3{\expandafter\NAT@apalk#1#2, \@nil{#3}}
672
+ \newcommand\harvarditem[4][]%
673
+ {\if\relax#1\relax\bibitem[#2(#3)]{#4}\else
674
+ \bibitem[#1(#3)#2]{#4}\fi }
675
+ \newcommand\harvardleft{\NAT@open}
676
+ \newcommand\harvardright{\NAT@close}
677
+ \newcommand\harvardyearleft{\NAT@open}
678
+ \newcommand\harvardyearright{\NAT@close}
679
+ \AtBeginDocument{\providecommand{\harvardand}{and}}
680
+ \newcommand\harvardurl[1]{\textbf{URL:} \textit{#1}}
681
+ \providecommand\bibsection{}
682
+ \@ifundefined{chapter}%
683
+ {\renewcommand\bibsection{\section*{\refname
684
+ \@mkboth{\MakeUppercase{\refname}}{\MakeUppercase{\refname}}}}}
685
+ {\@ifundefined{NAT@sectionbib}%
686
+ {\renewcommand\bibsection{\chapter*{\bibname
687
+ \@mkboth{\MakeUppercase{\bibname}}{\MakeUppercase{\bibname}}}}}
688
+ {\renewcommand\bibsection{\section*{\bibname
689
+ \ifx\@mkboth\@gobbletwo\else\markright{\MakeUppercase{\bibname}}\fi}}}}
690
+ \@ifclassloaded{amsart}%
691
+ {\renewcommand\bibsection{\section*{\refname}}}{}
692
+ \@ifclassloaded{amsbook}%
693
+ {\renewcommand\bibsection{\chapter*{\bibname}}}{}
694
+ \@ifundefined{bib@heading}{}{\let\bibsection\bib@heading}
695
+ \newcounter{NAT@ctr}
696
+ \renewenvironment{thebibliography}[1]{%
697
+ \bibsection
698
+ \vspace{1\p@}\parindent \z@\bibpreamble\bibfont\list
699
+ {\@biblabel{\arabic{NAT@ctr}}}{\@bibsetup{#1}%
700
+ \setcounter{NAT@ctr}{0}}%
701
+ \ifNAT@openbib
702
+ \renewcommand\newblock{\par}
703
+ \else
704
+ \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
705
+ \fi
706
+ \sloppy\clubpenalty4000\widowpenalty4000
707
+ \sfcode`\.=1000\relax
708
+ \let\citeN\cite \let\shortcite\cite
709
+ \let\citeasnoun\cite\fontsize{7}{9}\selectfont
710
+ }{\def\@noitemerr{%
711
+ \PackageWarning{natbib}
712
+ {Empty `thebibliography' environment}}%
713
+ \endlist\vskip-\lastskip}
714
+ \let\bibfont\relax
715
+ \let\bibpreamble\relax
716
+ \providecommand\reset@font{\relax}
717
+ \providecommand\bibname{Bibliography}
718
+ \providecommand\refname{References}
719
+ \newcommand\NAT@citeundefined{\gdef \NAT@undefined {%
720
+ \PackageWarningNoLine{natbib}{There were undefined citations}}}
721
+ \let \NAT@undefined \relax
722
+ \newcommand\NAT@citemultiple{\gdef \NAT@multiple {%
723
+ \PackageWarningNoLine{natbib}{There were multiply defined citations}}}
724
+ \let \NAT@multiple \relax
725
+ \AtEndDocument{\NAT@undefined\NAT@multiple}
726
+ \providecommand\@mkboth[2]{}
727
+ \providecommand\MakeUppercase{\uppercase}
728
+ \providecommand{\@extra@b@citeb}{}
729
+ \gdef\@extra@binfo{}
730
+ \providecommand\hyper@natanchorstart[1]{}
731
+ \providecommand\hyper@natanchorend{}
732
+ \providecommand\hyper@natlinkstart[1]{}
733
+ \providecommand\hyper@natlinkend{}
734
+ \providecommand\hyper@natlinkbreak[2]{#1}
735
+ \@ifundefined{bbl@redefine}{}{%
736
+ \bbl@redefine\nocite#1{%
737
+ \@safe@activestrue\org@nocite{#1}\@safe@activesfalse}%
738
+ \bbl@redefine\@lbibitem[#1]#2{%
739
+ \@safe@activestrue\org@@lbibitem[#1]{#2}\@safe@activesfalse}%
740
+ }
741
+ \AtBeginDocument{\@ifundefined{bbl@redefine}{}{%
742
+ \bbl@redefine\@citex[#1][#2]#3{%
743
+ \@safe@activestrue\org@@citex[#1][#2]{#3}\@safe@activesfalse}%
744
+ \bbl@redefine\NAT@testdef#1#2{%
745
+ \@safe@activestrue\org@NAT@testdef{#1}{#2}\@safe@activesfalse}%
746
+ \@ifundefined{org@@lbibitem}{%
747
+ \bbl@redefine\@lbibitem[#1]#2{%
748
+ \@safe@activestrue\org@@lbibitem[#1]{#2}\@safe@activesfalse}}{}%
749
+ }}
750
+ \ifnum\NAT@sort>0
751
+ \newcommand\NAT@sort@cites[1]{%
752
+ \@tempcntb\m@ne
753
+ \let\@celt\delimiter
754
+ \def\NAT@num@list{}%
755
+ \def\NAT@cite@list{}%
756
+ \def\NAT@nonsort@list{}%
757
+ \@for \@citeb:=#1\do{\NAT@make@cite@list}%
758
+ \edef\NAT@cite@list{\NAT@cite@list\NAT@nonsort@list}%
759
+ \edef\NAT@cite@list{\expandafter\NAT@xcom\NAT@cite@list @@}}
760
+ \begingroup \catcode`\_=8
761
+ \gdef\NAT@make@cite@list{%
762
+ \edef\@citeb{\expandafter\@firstofone\@citeb}%
763
+ \@ifundefined{b@\@citeb\@extra@b@citeb}{\def\NAT@num{A}}%
764
+ {\NAT@parse{\@citeb}}%
765
+ \ifcat _\ifnum\z@<0\NAT@num _\else A\fi
766
+ \@tempcnta\NAT@num \relax
767
+ \ifnum \@tempcnta>\@tempcntb
768
+ \edef\NAT@num@list{\NAT@num@list \@celt{\NAT@num}}%
769
+ \edef\NAT@cite@list{\NAT@cite@list\@citeb,}%
770
+ \@tempcntb\@tempcnta
771
+ \else
772
+ \let\NAT@@cite@list=\NAT@cite@list \def\NAT@cite@list{}%
773
+ \edef\NAT@num@list{\expandafter\NAT@num@celt \NAT@num@list \@gobble @}%
774
+ {\let\@celt=\NAT@celt\NAT@num@list}%
775
+ \fi
776
+ \else
777
+ \edef\NAT@nonsort@list{\NAT@nonsort@list\@citeb,}%
778
+ \fi}
779
+ \endgroup
780
+ \def\NAT@celt#1{\ifnum #1<\@tempcnta
781
+ \xdef\NAT@cite@list{\NAT@cite@list\expandafter\NAT@nextc\NAT@@cite@list @@}%
782
+ \xdef\NAT@@cite@list{\expandafter\NAT@restc\NAT@@cite@list}%
783
+ \else
784
+ \xdef\NAT@cite@list{\NAT@cite@list\@citeb,\NAT@@cite@list}\let\@celt\@gobble%
785
+ \fi}
786
+ \def\NAT@num@celt#1#2{\ifx \@celt #1%
787
+ \ifnum #2<\@tempcnta
788
+ \@celt{#2}%
789
+ \expandafter\expandafter\expandafter\NAT@num@celt
790
+ \else
791
+ \@celt{\number\@tempcnta}\@celt{#2}%
792
+ \fi\fi}
793
+ \def\NAT@nextc#1,#2@@{#1,}
794
+ \def\NAT@restc#1,#2{#2}
795
+ \def\NAT@xcom#1,@@{#1}
796
+ \else
797
+ \newcommand\NAT@sort@cites[1]{\edef\NAT@cite@list{#1}}\fi
798
+ \InputIfFileExists{natbib.cfg}
799
+ {\typeout{Local config file natbib.cfg used}}{}
800
+ %%
801
+ %% <<<<< End of generated file <<<<<<
802
+ %%
803
+ %% End of file `natbib.sty'.