Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/RMarkdown/rticles/rss_article/natbib.sty
Views: 1114
%%1%% This is file `natbib.sty',2%% generated with the docstrip utility.3%%4%% The original source files were:5%%6%% natbib.dtx (with options: `package,all')7%%8%% Full documentation can be obtained by LaTeXing the source file:9%% natbib.dtx.10%%11%% Only a few abbreviated comments remain here to describe the usage.12%%13\NeedsTeXFormat{LaTeX2e}[1994/06/01]14\ProvidesPackage{natbib}15[1998/02/19 6.8 (PWD)]16%%-------------------------------------------------------------------17%% NOTICE:18%% This file may be used for non-profit purposes.19%% It may not be distributed in exchange for money,20%% other than distribution costs.21%%22%% The author provides it `as is' and does not guarantee it in any way.23%%24%% Natbib coding copyright (C) 1994--1998 Patrick W. Daly25%% Max-Planck-Institut f\"ur Aeronomie26%% Max-Planck-Str. 227%% D-37191 Katlenburg-Lindau28%% Germany29%%30%% E-mail: daly@linmpi.mpg.de31%%-----------------------------------------------------------32% This package reimplements the LaTeX \cite command to be used for various33% citation styles, both author-year and numerical. It accepts BibTeX34% output intended for many other packages, and therefore acts as a35% general, all-purpose citation-style interface.36%37% With standard numerical .bst files, only numerical citations are38% possible. With an author-year .bst file, both numerical and39% author-year citations are possible.40%41% If author-year citations are selected, \bibitem must have one of the42% following forms:43% \bibitem[Jones et al.(1990)]{key}...44% \bibitem[Jones et al.(1990)Jones, Baker, and Williams]{key}...45% \bibitem[Jones et al., 1990]{key}...46% \bibitem[\protect\citeauthoryear{Jones, Baker, and Williams}{Jones47% et al.}{1990}]{key}...48% \bibitem[\protect\citeauthoryear{Jones et al.}{1990}]{key}...49% \bibitem[\protect\astroncite{Jones et al.}{1990}]{key}...50% \bibitem[\protect\citename{Jones et al., }1990]{key}...51% \harvarditem[Jones et al.]{Jones, Baker, and Williams}{1990}{key}...52%53% This is either to be made up manually, or to be generated by an54% appropriate .bst file with BibTeX.55% Author-year mode || Numerical mode56% Then, \citet{key} ==>> Jones et al. (1990) || Jones et al. [21]57% \citep{key} ==>> (Jones et al., 1990) || [21]58% Multiple citations as normal:59% \citep{key1,key2} ==>> (Jones et al., 1990; Smith, 1989) || [21,24]60% or (Jones et al., 1990, 1991) || [21,24]61% or (Jones et al., 1990a,b) || [21,24]62% \cite{key} is the equivalent of \citet{key} in author-year mode63% and of \citep{key} in numerical mode64% Full author lists may be forced with \citet* or \citep*, e.g.65% \citep*{key} ==>> (Jones, Baker, and Williams, 1990)66% Optional notes as:67% \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)68% \citep[e.g.,][]{key} ==>> (e.g., Jones et al., 1990)69% \citep[see][pg. 34]{key}==>> (see Jones et al., 1990, pg. 34)70% (Note: in standard LaTeX, only one note is allowed, after the ref.71% Here, one note is like the standard, two make pre- and post-notes.)72% \citealt{key} ==>> Jones et al. 199073% \citealt*{key} ==>> Jones, Baker, and Williams 199074% \citealp{key} ==>> Jones et al., 199075% \citealp*{key} ==>> Jones, Baker, and Williams, 199076% Additional citation possibilities (both author-year and numerical modes)77% \citeauthor{key} ==>> Jones et al.78% \citeauthor*{key} ==>> Jones, Baker, and Williams79% \citeyear{key} ==>> 199080% \citeyearpar{key} ==>> (1990)81% \citetext{priv. comm.} ==>> (priv. comm.)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% Defining the citation style of a given bib style:86% Use \bibpunct (in the preamble only) with 6 mandatory arguments:87% 1. opening bracket for citation88% 2. closing bracket89% 3. citation separator (for multiple citations in one \cite)90% 4. the letter n for numerical styles, s for superscripts91% else anything for author-year92% 5. punctuation between authors and date93% 6. punctuation between years (or numbers) when common authors missing94% One optional argument is the character coming before post-notes. It95% appears in square braces before all other arguments. May be left off.96% Example (and default) \bibpunct[,]{(}{)}{;}{a}{,}{,}97%98% To make this automatic for a given bib style, named newbib, say, make99% a local configuration file, natbib.cfg, with the definition100% \newcommand{\bibstyle@newbib}{\bibpunct...}101% Then the \bibliographystyle{newbib} will cause \bibstyle@newbib to102% be called on THE NEXT LATEX RUN (via the aux file).103%104% Such preprogrammed definitions may be invoked in the text (preamble only)105% by calling \citestyle{newbib}. This is only useful if the style specified106% differs from that in \bibliographystyle.107%108% With \citeindextrue and \citeindexfalse, one can control whether the109% \cite commands make an automatic entry of the citation in the .idx110% indexing file. For this, \makeindex must also be given in the preamble.111%112% LaTeX2e Options: (for selecting punctuation)113% round - round parentheses are used (default)114% square - square brackets are used [option]115% curly - curly braces are used {option}116% angle - angle brackets are used <option>117% colon - multiple citations separated by colon (default)118% comma - separated by comma119% authoryear - selects author-year citations (default)120% numbers- selects numerical citations121% super - numerical citations as superscripts122% sort - sorts multiple citations according to order in ref. list123% sort&compress - like sort, but also compresses numerical citations124% longnamesfirst - makes first citation full author list125% sectionbib - puts bibliography in a \section* instead of \chapter*126% Punctuation so selected dominates over any predefined ones.127% LaTeX2e options are called as, e.g.128% \usepackage[square,comma]{natbib}129% LaTeX the source file natbib.dtx to obtain more details130% or the file natnotes.tex for a brief reference sheet.131%-----------------------------------------------------------132\@ifclassloaded{aguplus}{\PackageError{natbib}133{The aguplus class already includes natbib coding,\MessageBreak134so you should not add it explicitly}135{Type <Return> for now, but then later remove\MessageBreak136the command \protect\usepackage{natbib} from the document}137\endinput}{}138\@ifclassloaded{nlinproc}{\PackageError{natbib}139{The nlinproc class already includes natbib coding,\MessageBreak140so you should not add it explicitly}141{Type <Return> for now, but then later remove\MessageBreak142the command \protect\usepackage{natbib} from the document}143\endinput}{}144\@ifclassloaded{egs}{\PackageError{natbib}145{The egs class already includes natbib coding,\MessageBreak146so you should not add it explicitly}147{Type <Return> for now, but then later remove\MessageBreak148the command \protect\usepackage{natbib} from the document}149\endinput}{}150% Define citation punctuation for some author-year styles151% One may add and delete at this point152% Or put additions into local configuration file natbib.cfg153\newcommand\bibstyle@chicago{\bibpunct{(}{)}{;}{a}{,}{,}}154\newcommand\bibstyle@named{\bibpunct{[}{]}{;}{a}{,}{,}}155\newcommand\bibstyle@agu{\bibpunct{[}{]}{;}{a}{,}{,~}}%Amer. Geophys. Union156\newcommand\bibstyle@egs{\bibpunct{(}{)}{;}{a}{,}{,}}%Eur. Geophys. Soc.157\newcommand\bibstyle@agsm{\bibpunct{(}{)}{,}{a}{}{,}\gdef\harvardand{\&}}158\newcommand\bibstyle@kluwer{\bibpunct{(}{)}{,}{a}{}{,}\gdef\harvardand{\&}}159\newcommand\bibstyle@dcu{\bibpunct{(}{)}{;}{a}{;}{,}\gdef\harvardand{and}}160\newcommand\bibstyle@aa{\bibpunct{(}{)}{;}{a}{}{,}} %Astronomy & Astrophysics161\newcommand\bibstyle@pass{\bibpunct{(}{)}{;}{a}{,}{,}}%Planet. & Space Sci162\newcommand\bibstyle@anngeo{\bibpunct{(}{)}{;}{a}{,}{,}}%Annales Geophysicae163\newcommand\bibstyle@nlinproc{\bibpunct{(}{)}{;}{a}{,}{,}}%Nonlin.Proc.Geophys.164% Define citation punctuation for some numerical styles165\newcommand\bibstyle@cospar{\bibpunct{/}{/}{,}{n}{}{}%166\gdef\NAT@biblabelnum##1{##1.}}167\newcommand\bibstyle@esa{\bibpunct{(}{)}{,}{n}{}{}%168\gdef\NAT@biblabelnum##1{##1.\hspace{1em}}%169\gdef\NAT@citenum##1##2##3{\NAT@@open \if\relax##2\relax\else170##2\ \fi Ref.~##1\if\relax##3\relax\else\NAT@cmt\171##3\fi\NAT@@close\endgroup}}172\newcommand\bibstyle@nature{\bibpunct{}{}{,}{s}{}{\textsuperscript{,}}%173\gdef\NAT@biblabelnum##1{##1.}}174% The standard LaTeX styles175\newcommand\bibstyle@plain{\bibpunct{[}{]}{,}{n}{}{,}}176\let\bibstyle@alpha=\bibstyle@plain177\let\bibstyle@abbrv=\bibstyle@plain178\let\bibstyle@unsrt=\bibstyle@plain179% The author-year modifications of the standard styles180\newcommand\bibstyle@plainnat{\bibpunct{[}{]}{,}{a}{,}{,}}181\let\bibstyle@abbrvnat=\bibstyle@plainnat182\let\bibstyle@unsrtnat=\bibstyle@plainnat183\newif\ifNAT@numbers \NAT@numbersfalse184\newif\ifNAT@super \NAT@superfalse185\DeclareOption{numbers}{\NAT@numberstrue186\ExecuteOptions{square,comma,nobibstyle}}187\DeclareOption{super}{\NAT@supertrue\NAT@numberstrue188\ExecuteOptions{nobibstyle}}189\DeclareOption{authoryear}{\NAT@numbersfalse190\ExecuteOptions{round,colon,bibstyle}}191\DeclareOption{round}{%192\renewcommand\NAT@open{(} \renewcommand\NAT@close{)}193\ExecuteOptions{nobibstyle}}194\DeclareOption{square}{%195\renewcommand\NAT@open{[} \renewcommand\NAT@close{]}196\ExecuteOptions{nobibstyle}}197\DeclareOption{angle}{%198\renewcommand\NAT@open{$<$} \renewcommand\NAT@close{$>$}199\ExecuteOptions{nobibstyle}}200\DeclareOption{curly}{%201\renewcommand\NAT@open{\{} \renewcommand\NAT@close{\}}202\ExecuteOptions{nobibstyle}}203\DeclareOption{comma}{\renewcommand\NAT@sep{,}204\ExecuteOptions{nobibstyle}}205\DeclareOption{colon}{\renewcommand\NAT@sep{;}206\ExecuteOptions{nobibstyle}}207\DeclareOption{nobibstyle}{\let\bibstyle=\@gobble}208\DeclareOption{bibstyle}{\let\bibstyle=\@citestyle}209\newif\ifNAT@openbib \NAT@openbibfalse210\DeclareOption{openbib}{\NAT@openbibtrue}211\DeclareOption{sectionbib}{\def\NAT@sectionbib{on}}212\def\NAT@sort{0}213\DeclareOption{sort}{\def\NAT@sort{1}}214\DeclareOption{sort&compress}{\def\NAT@sort{2}}215\@ifpackageloaded{cite}{\PackageWarningNoLine{natbib}216{The `cite' package should not be used\MessageBreak217with natbib. Use option `sort' instead}\ExecuteOptions{sort}}{}218\newif\ifNAT@longnames\NAT@longnamesfalse219\DeclareOption{longnamesfirst}{\NAT@longnamestrue}220\renewcommand\bibstyle[1]{\@ifundefined{bibstyle@#1}{\relax}221{\csname bibstyle@#1\endcsname}}222\AtBeginDocument{\global\let\bibstyle=\@gobble}223\let\@citestyle\bibstyle224\newcommand\citestyle[1]{\@citestyle{#1}\let\bibstyle\@gobble}225\@onlypreamble{\citestyle}\@onlypreamble{\@citestyle}226\newcommand\bibpunct[7][,]%227{\gdef\NAT@open{#2}\gdef\NAT@close{#3}\gdef228\NAT@sep{#4}\global\NAT@numbersfalse\ifx #5n\global\NAT@numberstrue229\else230\ifx #5s\global\NAT@numberstrue\global\NAT@supertrue231\fi\fi232\gdef\NAT@aysep{#6}\gdef\NAT@yrsep{#7}%233\gdef\NAT@cmt{#1}%234\global\let\bibstyle\@gobble235}236\@onlypreamble{\bibpunct}237\newcommand\NAT@open{(} \newcommand\NAT@close{)}238\newcommand\NAT@sep{;}239\ProcessOptions240\newcommand\NAT@aysep{,} \newcommand\NAT@yrsep{,}241\newcommand\NAT@cmt{,}242\newcommand\NAT@cite%243[3]{\ifNAT@swa\NAT@@open\if\relax#2\relax\else#2\ \fi244#1\if\relax#3\relax\else\NAT@cmt\ #3\fi\NAT@@close\else#1\fi\endgroup}245\newcommand\NAT@citenum%246[3]{\ifNAT@swa\NAT@@open\if\relax#2\relax\else#2\ \fi247#1\if\relax#3\relax\else\NAT@cmt\ #3\fi\NAT@@close\else#1\fi\endgroup}248\newcommand\NAT@citesuper[3]{\ifNAT@swa249\unskip\hspace{1\p@}\textsuperscript{#1}%250\if\relax#3\relax\else\ (#3)\fi\else #1\fi\endgroup}251\providecommand252\textsuperscript[1]{\mbox{$^{\mbox{\scriptsize#1}}$}}253\providecommand\@firstofone[1]{#1}254\newcommand\NAT@citexnum{}255\def\NAT@citexnum[#1][#2]#3{%256\NAT@sort@cites{#3}%257\let\@citea\@empty258\@cite{\def\NAT@num{-1}\let\NAT@last@yr\relax\let\NAT@nm\@empty259\@for\@citeb:=\NAT@cite@list\do260{\edef\@citeb{\expandafter\@firstofone\@citeb}%261\if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi262\@ifundefined{b@\@citeb\@extra@b@citeb}{%263{\reset@font\bfseries?}264\NAT@citeundefined\PackageWarning{natbib}%265{Citation `\@citeb' on page \thepage \space undefined}}%266{\let\NAT@last@num\NAT@num\let\NAT@last@nm\NAT@nm267\NAT@parse{\@citeb}%268\ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%269\let\NAT@name=\NAT@all@names270\global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%271\fi272\ifNAT@full\let\NAT@nm\NAT@all@names\else273\let\NAT@nm\NAT@name\fi274\ifNAT@swa275\ifnum\NAT@ctype=2\relax\@citea276\hyper@natlinkstart{\@citeb}\NAT@test{2}\hyper@natlinkend\else277\ifnum\NAT@sort>1278\begingroup\catcode`\_=8279\ifcat _\ifnum\z@<0\NAT@num _\else A\fi280\global\let\NAT@nm=\NAT@num \else \gdef\NAT@nm{-2}\fi281\ifcat _\ifnum\z@<0\NAT@last@num _\else A\fi282\global\@tempcnta=\NAT@last@num \global\advance\@tempcnta by\@ne283\else \global\@tempcnta\m@ne\fi284\endgroup285\ifnum\NAT@nm=\@tempcnta286\ifx\NAT@last@yr\relax287\edef\NAT@last@yr{\@citea \mbox{\NAT@num}}%288\else289\edef\NAT@last@yr{--\penalty\@m\mbox{\NAT@num}}%290\fi291\else292\NAT@last@yr \@citea \mbox{\NAT@num}%293\let\NAT@last@yr\relax294\fi295\else296\@citea \mbox{\hyper@natlinkstart{\@citeb}\NAT@num297\hyper@natlinkend}%298\fi299\fi300\def\@citea{\NAT@sep\penalty\@m\NAT@space}%301\else302\ifcase\NAT@ctype\relax303\ifx\NAT@last@nm\NAT@nm \NAT@yrsep\penalty\@m\NAT@space\else304\@citea \NAT@test{1}\ \NAT@@open305\if\relax#1\relax\else#1\ \fi\fi \NAT@mbox{%306\hyper@natlinkstart{\@citeb}\NAT@num\hyper@natlinkend}%307\def\@citea{\NAT@@close\NAT@sep\penalty\@m\ }%308\or\@citea309\hyper@natlinkstart{\@citeb}\NAT@test{1}\hyper@natlinkend310\def\@citea{\NAT@sep\penalty\@m\ }%311\or\@citea312\hyper@natlinkstart{\@citeb}\NAT@test{2}\hyper@natlinkend313\def\@citea{\NAT@sep\penalty\@m\ }%314\fi315\fi316}}%317\ifnum\NAT@sort>1\NAT@last@yr\fi318\ifNAT@swa\else\ifnum\NAT@ctype=0\if\relax#2\relax\else319\NAT@cmt\ #2\fi \NAT@@close\fi\fi}{#1}{#2}}320\newcommand\NAT@test[1]{\ifnum#1=1 \ifx\NAT@nm\NAT@noname321{\reset@font\bfseries(author?)}\PackageWarning{natbib}322{Author undefined for citation`\@citeb'323\MessageBreak324on page \thepage}\else \NAT@nm \fi325\else \if\relax\NAT@date\relax326{\reset@font\bfseries(year?)}\PackageWarning{natbib}327{Year undefined for citation`\@citeb'328\MessageBreak329on page \thepage}\else \NAT@date \fi \fi}330\newcommand\NAT@citex{}331\def\NAT@citex%332[#1][#2]#3{%333\NAT@sort@cites{#3}%334\let\@citea\@empty335\@cite{\let\NAT@nm\@empty\let\NAT@year\@empty336\@for\@citeb:=\NAT@cite@list\do337{\edef\@citeb{\expandafter\@firstofone\@citeb}%338\if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi339\@ifundefined{b@\@citeb\@extra@b@citeb}{\@citea%340{\reset@font\bfseries ?}\NAT@citeundefined341\PackageWarning{natbib}%342{Citation `\@citeb' on page \thepage \space undefined}}%343{\let\NAT@last@nm=\NAT@nm\let\NAT@last@yr=\NAT@year344\NAT@parse{\@citeb}%345\ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%346\let\NAT@name=\NAT@all@names347\global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%348\fi349\ifNAT@full\let\NAT@nm\NAT@all@names\else350\let\NAT@nm\NAT@name\fi351\ifNAT@swa\ifcase\NAT@ctype352\ifx\NAT@last@nm\NAT@nm\NAT@yrsep353\ifx\NAT@last@yr\NAT@year354\hyper@natlinkstart{\@citeb}\NAT@exlab\hyper@natlinkend355\else\unskip\356\hyper@natlinkstart{\@citeb}\NAT@date\hyper@natlinkend357\fi358\else\@citea\hyper@natlinkstart{\@citeb}{\NAT@nm}\NAT@aysep359\ \NAT@date\hyper@natlinkend \fi360\or\@citea\hyper@natlinkstart{\@citeb}%361{\NAT@nm}\hyper@natlinkend362\or\@citea\hyper@natlinkstart{\@citeb}%363\NAT@date\hyper@natlinkend\fi \def\@citea{\NAT@sep\ }%364\else\ifcase\NAT@ctype365\ifx\NAT@last@nm\NAT@nm\NAT@yrsep366\ifx\NAT@last@yr\NAT@year367\hyper@natlinkstart{\@citeb}\NAT@exlab\hyper@natlinkend368\else\unskip\369\hyper@natlinkstart{\@citeb}\NAT@date\hyper@natlinkend370\fi371\else\@citea\hyper@natlinkstart{\@citeb}%372{\NAT@nm}\ \NAT@@open\if\relax#1\relax\else#1\ \fi373\NAT@date\hyper@natlinkend\fi374\or\@citea\hyper@natlinkstart{\@citeb}%375{\NAT@nm}\hyper@natlinkend376\or\@citea\hyper@natlinkstart{\@citeb}%377\NAT@date\hyper@natlinkend\fi \def\@citea{\NAT@@close\NAT@sep\ }%378\fi379}}\ifNAT@swa\else\if\relax#2\relax\else\NAT@cmt\ #2\fi380\NAT@@close\fi}{#1}{#2}}381\newif\ifNAT@par \NAT@partrue382\newcommand\NAT@@open{\ifNAT@par\NAT@open\fi}383\newcommand\NAT@@close{\ifNAT@par\NAT@close\fi}384\newcommand\shortcites[1]{%385\@bsphack\@for\@citeb:=#1\do386{\edef\@citeb{\expandafter\@firstofone\@citeb}%387\global\@namedef{bv@\@citeb\@extra@b@citeb}{}}\@esphack}388\newcommand\NAT@biblabel[1]{\hfill}389\newcommand\NAT@biblabelnum[1]{[#1]}390\def\@tempa#1{[#1]}391\ifx\@tempa\@biblabel\let\@biblabel\@empty\fi392\newcommand\NAT@bibsetnum[1]{\settowidth\labelwidth{\@biblabel{#1}}%393\setlength{\leftmargin}{\labelwidth}\addtolength{\leftmargin}{\labelsep}%394\setlength{\itemsep}{\bibsep}\setlength{\parsep}{\z@}%395\ifNAT@openbib396\addtolength{\leftmargin}{\bibindent}%397\setlength{\itemindent}{-\bibindent}%398\setlength{\listparindent}{\itemindent}%399\setlength{\parsep}{0pt}%400\fi401}402\newlength{\bibhang}403\setlength{\bibhang}{1em}404\newlength{\bibsep}405{\@listi \global\bibsep\itemsep \global\advance\bibsep by\parsep}406407\newcommand\NAT@bibsetup%408[1]{\setlength{\leftmargin}{\bibhang}\setlength{\itemindent}{-\leftmargin}%409\setlength{\itemsep}{\bibsep}\setlength{\parsep}{\z@}}410\newcommand\NAT@set@cites{\ifNAT@numbers411\ifNAT@super \let\@cite\NAT@citesuper412\def\NAT@mbox##1{\unskip\nobreak\hspace{1\p@}\textsuperscript{##1}}%413\let\citeyearpar=\citeyear414\let\NAT@space\relax\else415\let\NAT@mbox=\mbox416\let\@cite\NAT@citenum \def\NAT@space{ }\fi417\let\@citex\NAT@citexnum418\ifx\@biblabel\@empty\let\@biblabel\NAT@biblabelnum\fi419\let\@bibsetup\NAT@bibsetnum420\def\natexlab##1{}%421\else422\let\@cite\NAT@cite423\let\@citex\NAT@citex424\ifx\@biblabel\@empty\let\@biblabel\NAT@biblabel\fi425\let\@bibsetup\NAT@bibsetup426\def\natexlab##1{##1}%427\fi}428\AtBeginDocument{\NAT@set@cites}429\AtBeginDocument{\ifx\SK@def\@undefined\else430\ifx\SK@cite\@empty\else431\SK@def\@citex[#1][#2]#3{\SK@\SK@@ref{#3}\SK@@citex[#1][#2]{#3}}\fi432\ifx\SK@citeauthor\@undefined\def\HAR@checkdef{}\else433\let\citeauthor\SK@citeauthor434\let\citefullauthor\SK@citefullauthor435\let\citeyear\SK@citeyear\fi436\fi}437\AtBeginDocument{\@ifpackageloaded{hyperref}{%438\ifnum\NAT@sort=2\def\NAT@sort{1}\fi}{}}439\newif\ifNAT@full\NAT@fullfalse440\newif\ifNAT@swa441\DeclareRobustCommand\citet442{\begingroup\NAT@swafalse\def\NAT@ctype{0}\NAT@partrue443\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}444\newcommand\NAT@citetp{\@ifnextchar[{\NAT@@citetp}{\NAT@@citetp[]}}445\newcommand\NAT@@citetp{}446\def\NAT@@citetp[#1]{\@ifnextchar[{\@citex[#1]}{\@citex[][#1]}}447\DeclareRobustCommand\citep448{\begingroup\NAT@swatrue\def\NAT@ctype{0}\NAT@partrue449\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}450\DeclareRobustCommand\cite451{\begingroup\def\NAT@ctype{0}\NAT@partrue\NAT@swatrue452\@ifstar{\NAT@fulltrue\NAT@cites}{\NAT@fullfalse\NAT@cites}}453\newcommand\NAT@cites{\@ifnextchar [{\NAT@@citetp}{%454\ifNAT@numbers\else455\NAT@swafalse456\fi457\NAT@@citetp[]}}458\DeclareRobustCommand\citealt459{\begingroup\NAT@swafalse\def\NAT@ctype{0}\NAT@parfalse460\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}461\DeclareRobustCommand\citealp462{\begingroup\NAT@swatrue\def\NAT@ctype{0}\NAT@parfalse463\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}464\DeclareRobustCommand\citeauthor465{\begingroup\NAT@swafalse\def\NAT@ctype{1}\NAT@parfalse466\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}467\DeclareRobustCommand\citeyear468{\begingroup\NAT@swafalse\def\NAT@ctype{2}\NAT@parfalse\NAT@citetp}469\DeclareRobustCommand\citeyearpar470{\begingroup\NAT@swatrue\def\NAT@ctype{2}\NAT@partrue\NAT@citetp}471\newcommand\citetext[1]{\NAT@open#1\NAT@close}472\DeclareRobustCommand\citefullauthor473{\citeauthor*}474\renewcommand\nocite[1]{\@bsphack475\@for\@citeb:=#1\do{%476\edef\@citeb{\expandafter\@firstofone\@citeb}%477\if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi478\if*\@citeb\else479\@ifundefined{b@\@citeb\@extra@b@citeb}{%480\NAT@citeundefined \PackageWarning{natbib}%481{Citation `\@citeb' undefined}}{}\fi}%482\@esphack}483\newcommand\NAT@parse[1]{{%484\let\protect=\@unexpandable@protect\let~\relax485\let\active@prefix=\@gobble486\xdef\NAT@temp{\csname b@#1\@extra@b@citeb\endcsname}}%487\expandafter\NAT@split\NAT@temp488\expandafter\NAT@parse@date\NAT@date??????@@%489\ifciteindex\NAT@index\fi490}491\newcommand\NAT@split[4]{%492\gdef\NAT@num{#1}\gdef\NAT@name{#3}\gdef\NAT@date{#2}%493\gdef\NAT@all@names{#4}%494\ifx\NAT@noname\NAT@all@names \gdef\NAT@all@names{#3}\fi}495\newcommand\NAT@parse@date{}496\def\NAT@parse@date#1#2#3#4#5#6@@{%497\ifnum\the\catcode`#1=11\def\NAT@year{}\def\NAT@exlab{#1}\else498\ifnum\the\catcode`#2=11\def\NAT@year{#1}\def\NAT@exlab{#2}\else499\ifnum\the\catcode`#3=11\def\NAT@year{#1#2}\def\NAT@exlab{#3}\else500\ifnum\the\catcode`#4=11\def\NAT@year{#1#2#3}\def\NAT@exlab{#4}\else501\def\NAT@year{#1#2#3#4}\def\NAT@exlab{{#5}}\fi\fi\fi\fi}502\newcommand\NAT@index{}503\let\NAT@makeindex=\makeindex504\renewcommand\makeindex{\NAT@makeindex505\renewcommand\NAT@index{\@bsphack\begingroup506\def~{\string~}\@wrindex{\NAT@idxtxt}}}507\newcommand\NAT@idxtxt{\NAT@name\ \NAT@open\NAT@date\NAT@close}508\newif\ifciteindex \citeindexfalse509\newcommand\citeindextype{default}510\newcommand\NAT@index@alt{{\let\protect=\noexpand\let~\relax511\xdef\NAT@temp{\NAT@idxtxt}}\expandafter\NAT@exp\NAT@temp\@nil}512\newcommand\NAT@exp{}513\def\NAT@exp#1\@nil{\index[\citeindextype]{#1}}514515\AtBeginDocument{%516\@ifpackageloaded{index}{\let\NAT@index=\NAT@index@alt}{}}517\newcommand\NAT@ifcmd{\futurelet\NAT@temp\NAT@ifxcmd}518\newcommand\NAT@ifxcmd{\ifx\NAT@temp\relax\else\expandafter\NAT@bare\fi}519\def\NAT@bare#1(#2)#3()#4\@nil#5{%520\if\relax#2\relax521\expandafter\NAT@apalk#1, , \@nil{#5}\else522\stepcounter{NAT@ctr}%523\NAT@wrout{\arabic {NAT@ctr}}{#2}{#1}{#3}{#5}524\fi525}526\newcommand\NAT@wrout[5]{%527\if@filesw528{\let\protect\noexpand\let~\relax529\immediate530\write\@auxout{\string\bibcite{#5}{{#1}{#2}{{#3}}{{#4}}}}}\fi531\ignorespaces}532\def\NAT@noname{{}}533\renewcommand\bibitem{%534\@ifnextchar[{\@lbibitem}{%535\global\NAT@stdbsttrue536\stepcounter{NAT@ctr}\@lbibitem[\arabic{NAT@ctr}]}}537\def\@lbibitem[#1]#2{%538\@ifundefined{b@#2\@extra@b@citeb}{\def\NAT@num{}}{\NAT@parse{#2}}%539\item[\hfil\hyper@natanchorstart{#2}\@biblabel{\NAT@num}%540\hyper@natanchorend]%541\NAT@ifcmd#1()()\@nil{#2}}542\ifx\SK@lbibitem\@undefined\else543\let\SK@lbibitem\@lbibitem544\def\@lbibitem[#1]#2{%545\SK@lbibitem[#1]{#2}\SK@\SK@@label{#2}\ignorespaces}\fi546\newif\ifNAT@stdbst \NAT@stdbstfalse547548\AtEndDocument549{\ifNAT@stdbst\if@filesw\immediate\write\@auxout{\string550\global\string\NAT@numberstrue}\fi\fi551}552\providecommand\bibcite{}553\renewcommand\bibcite[2]{\@ifundefined{b@#1\@extra@binfo}\relax554{\NAT@citemultiple555\PackageWarningNoLine{natbib}{Citation `#1' multiply defined}}%556\global\@namedef{b@#1\@extra@binfo}{#2}}557\AtEndDocument{\NAT@swatrue\renewcommand\bibcite[2]%558{\NAT@testdef{#1}{#2}}}559\newcommand\NAT@testdef[2]{%560\def\NAT@temp{#2}\expandafter \ifx \csname b@#1\@extra@binfo\endcsname561\NAT@temp \else \ifNAT@swa \NAT@swafalse562\PackageWarningNoLine{natbib}{Citation(s) may have563changed.\MessageBreak564Rerun to get citations correct}\fi\fi}565\newcommand\NAT@apalk{}566\def\NAT@apalk#1, #2, #3\@nil#4{\if\relax#2\relax567\global\NAT@stdbsttrue568\NAT@wrout{#1}{}{}{}{#4}\else569\stepcounter{NAT@ctr}%570\NAT@wrout{\arabic {NAT@ctr}}{#2}{#1}{}{#4}\fi}571\newcommand\citeauthoryear{}572\def\citeauthoryear#1#2#3()()\@nil#4{\stepcounter{NAT@ctr}\if\relax#3\relax573\NAT@wrout{\arabic {NAT@ctr}}{#2}{#1}{}{#4}\else574\NAT@wrout{\arabic {NAT@ctr}}{#3}{#2}{#1}{#4}\fi}575\newcommand\citestarts{\NAT@open}576\newcommand\citeends{\NAT@close}577\newcommand\betweenauthors{and}578\newcommand\astroncite{}579\def\astroncite#1#2()()\@nil#3{\stepcounter{NAT@ctr}\NAT@wrout{\arabic580{NAT@ctr}}{#2}{#1}{}{#3}}581\newcommand\citename{}582\def\citename#1#2()()\@nil#3{\expandafter\NAT@apalk#1#2, \@nil{#3}}583\newcommand\harvarditem[4][]%584{\if\relax#1\relax\bibitem[#2(#3)]{#4}\else585\bibitem[#1(#3)#2]{#4}\fi }586\newcommand\harvardleft{\NAT@open}587\newcommand\harvardright{\NAT@close}588\newcommand\harvardyearleft{\NAT@open}589\newcommand\harvardyearright{\NAT@close}590\AtBeginDocument{\providecommand{\harvardand}{and}}591\newcommand\harvardurl[1]{\textbf{URL:} \textit{#1}}592\providecommand\bibsection{}593\@ifundefined{chapter}%594{\renewcommand\bibsection{\section*{\refname595\@mkboth{\MakeUppercase{\refname}}{\MakeUppercase{\refname}}}}}596{\@ifundefined{NAT@sectionbib}%597{\renewcommand\bibsection{\chapter*{\bibname598\@mkboth{\MakeUppercase{\bibname}}{\MakeUppercase{\bibname}}}}}599{\renewcommand\bibsection{\section*{\bibname600\ifx\@mkboth\@gobbletwo\else\markright{\MakeUppercase{\bibname}}\fi}}}}601\@ifclassloaded{amsart}%602{\renewcommand\bibsection{\section*{\refname}}{}}{}603\@ifclassloaded{amsbook}%604{\renewcommand\bibsection{\section*{\bibname}}{}}{}605\@ifundefined{bib@heading}{}{\let\bibsection\bib@heading}606\newcounter{NAT@ctr}607\renewenvironment{thebibliography}[1]{%608\bibfont\bibsection\parindent \z@\list609{\@biblabel{\arabic{NAT@ctr}}}{\@bibsetup{#1}%610\setcounter{NAT@ctr}{0}}%611\ifNAT@openbib612\renewcommand\newblock{\par}613\else614\renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%615\fi616\sloppy\clubpenalty4000\widowpenalty4000617\sfcode`\.=1000\relax618\let\citeN\cite \let\shortcite\cite619\let\citeasnoun\cite620}{\def\@noitemerr{%621\PackageWarning{natbib}622{Empty `thebibliography' environment}}%623\endlist\vskip-\lastskip}624\let\bibfont=\relax625\providecommand\reset@font{\relax}626\providecommand\bibname{Bibliography}627\providecommand\refname{References}628\newcommand\NAT@citeundefined{\gdef \NAT@undefined {%629\PackageWarningNoLine{natbib}{There were undefined citations}}}630\let \NAT@undefined \relax631\newcommand\NAT@citemultiple{\gdef \NAT@multiple {%632\PackageWarningNoLine{natbib}{There were multiply defined citations}}}633\let \NAT@multiple \relax634\AtEndDocument{\NAT@undefined\NAT@multiple}635\providecommand\@mkboth[2]{}636\providecommand\MakeUppercase{\uppercase}637\providecommand{\@extra@b@citeb}{}638\gdef\@extra@binfo{}639\providecommand\hyper@natanchorstart[1]{}640\providecommand\hyper@natanchorend{}641\providecommand\hyper@natlinkstart[1]{}642\providecommand\hyper@natlinkend{}643\@ifpackageloaded{babel}{\PackageWarningNoLine{natbib}{%644If you use both babel and natbib\MessageBreak645then load babel AFTER natbib}}{}646\AtBeginDocument{\@ifpackageloaded{babel}{%647\bbl@redefine\@citex[#1][#2]#3{%648\@safe@activestrue\org@@citex[#1][#2]{#3}\@safe@activesfalse}%649}{}}650\ifnum\NAT@sort>0651\newcommand\NAT@sort@cites[1]{%652\@tempcntb\m@ne653\let\@celt\delimiter654\def\NAT@num@list{}%655\def\NAT@cite@list{}%656\def\NAT@nonsort@list{}%657\@for \@citeb:=#1\do{\NAT@make@cite@list}%658\edef\NAT@cite@list{\NAT@cite@list\NAT@nonsort@list}%659\edef\NAT@cite@list{\expandafter\NAT@xcom\NAT@cite@list @@}}660\begingroup \catcode`\_=8661\gdef\NAT@make@cite@list{%662\edef\@citeb{\expandafter\@firstofone\@citeb}%663\@ifundefined{b@\@citeb\@extra@b@citeb}{\def\NAT@num{A}}%664{\NAT@parse{\@citeb}}%665\ifcat _\ifnum\z@<0\NAT@num _\else A\fi666\@tempcnta\NAT@num \relax667\ifnum \@tempcnta>\@tempcntb668\edef\NAT@num@list{\NAT@num@list \@celt{\NAT@num}}%669\edef\NAT@cite@list{\NAT@cite@list\@citeb,}%670\@tempcntb\@tempcnta671\else672\let\NAT@@cite@list=\NAT@cite@list \def\NAT@cite@list{}%673\edef\NAT@num@list{\expandafter\NAT@num@celt \NAT@num@list \@gobble @}%674{\let\@celt=\NAT@celt\NAT@num@list}%675\fi676\else677\edef\NAT@nonsort@list{\NAT@nonsort@list\@citeb,}%678\fi}679\endgroup680\def\NAT@celt#1{\ifnum #1<\@tempcnta681\xdef\NAT@cite@list{\NAT@cite@list\expandafter\NAT@nextc\NAT@@cite@list @@}%682\xdef\NAT@@cite@list{\expandafter\NAT@restc\NAT@@cite@list}%683\else684\xdef\NAT@cite@list{\NAT@cite@list\@citeb,\NAT@@cite@list}\let\@celt\@gobble%685\fi}686\def\NAT@num@celt#1#2{\ifx \@celt #1%687\ifnum #2<\@tempcnta688\@celt{#2}%689\expandafter\expandafter\expandafter\NAT@num@celt690\else691\@celt{\number\@tempcnta}\@celt{#2}%692\fi\fi}693\def\NAT@nextc#1,#2@@{#1,}694\def\NAT@restc#1,#2{#2}695\def\NAT@xcom#1,@@{#1}696\else697\newcommand\NAT@sort@cites[1]{\edef\NAT@cite@list{#1}}\fi698\InputIfFileExists{natbib.cfg}699{\typeout{Local config file natbib.cfg used}}{}700%%701%% <<<<< End of decommented file <<<<<<702%%703%% End of file `natbib.sty'.704705706