"Fossies" - the Fresh Open Source Software Archive

Member "hevea-2.35/examples/natbib.sty" (16 Jan 2021, 38464 Bytes) of package /linux/www/hevea-2.35.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TeX and LaTeX source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

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