added tech notes

This commit is contained in:
Heng Li 2017-08-01 10:38:33 -04:00
parent 46de0fbdad
commit d6181de844
5 changed files with 3302 additions and 0 deletions

928
tex/bioinfo.cls 100644
View File

@ -0,0 +1,928 @@
\newcommand\classname{bioinfo}
\newcommand\lastmodifieddate{2003/02/08}
\newcommand\versionnumber{0.1}
% Are we printing crop marks?
\newif\if@cropmarkson \@cropmarksontrue
\NeedsTeXFormat{LaTeX2e}[2001/06/01]
\ProvidesClass{\classname}[\lastmodifieddate\space\versionnumber]
\setlength{\paperheight}{11truein}
\setlength{\paperwidth}{8.5truein}
\newif\if@final
\DeclareOption{draft}{\PassOptionsToPackage{draft}{graphicx}}
\DeclareOption{a4paper}{\PassOptionsToPackage{a4}{crop}}
\DeclareOption{centre}{\PassOptionsToPackage{center}{crop}}
\DeclareOption{crop}{\PassOptionsToPackage{cam}{crop}\global\@cropmarksontrue}
\DeclareOption{nocrop}{\PassOptionsToPackage{off}{crop}\global\@cropmarksonfalse}
\DeclareOption{info}{\PassOptionsToPackage{info}{crop}}
\DeclareOption{noinfo}{\PassOptionsToPackage{noinfo}{crop}}
\DeclareOption{final}{\global\@finaltrue}
\ExecuteOptions{a4paper,nocrop,centre,info}
\ProcessOptions
% Load all necessary packages
\RequirePackage{inputenc,crop,graphicx,amsmath,array,color,amssymb,flushend,stfloats,amsthm,chngpage,times}
%\RequirePackage[LY1]{fontenc}
%\RequirePackage[LY1,mtbold]{mathtime}
\def\authoraffliate{\fontfamily{phv}\selectfont}
\def\helvetica{\fontfamily{phv}\selectfont}
\def\helveticaitalic{\fontfamily{phv}\itshape\selectfont}
\def\helveticabold{\fontfamily{phv}\bfseries\selectfont}
\def\helveticabolditalic{\fontfamily{phv}\bfseries\itshape\selectfont}
% Not sure if needed.
\newcommand\@ptsize{0}
% Set twoside printing
\@twosidetrue
% Marginal notes are on the outside edge
\@mparswitchfalse
\reversemarginpar
\renewcommand\normalsize{%
\@setfontsize\normalsize{9}{11}%
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
\abovedisplayshortskip \z@ \@plus3\p@
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
\belowdisplayskip \abovedisplayskip
\let\@listi\@listI}
\normalsize
\let\@bls\baselineskip
\newcommand\small{%
\@setfontsize\small{9}{11}%
\abovedisplayskip 11\p@ minus 3\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus 2\p@
\belowdisplayshortskip 4\p@ plus 2\p@ minus2\p@
\def\@listi{\topsep 4.5\p@ plus 2\p@ minus 1\p@
\itemsep \parsep
\topsep 4\p@ plus 2\p@ minus 2\p@}}
\newcommand\footnotesize{%
\@setfontsize\footnotesize{8}{10}%
\abovedisplayskip 6\p@ minus 3\p@
\belowdisplayskip\abovedisplayskip
\abovedisplayshortskip \z@ plus 3\p@
\belowdisplayshortskip 6\p@ plus 3\p@ minus 3\p@
\def\@listi{\topsep 3\p@ plus 1\p@ minus 1\p@
\parsep 2\p@ plus 1\p@ minus 1\p@\itemsep \parsep}}
\def\scriptsize{\@setfontsize\scriptsize{7pt}{9pt}}
\def\tiny{\@setfontsize\tiny{5pt}{7pt}}
\def\large{\@setfontsize\large{11.5pt}{12pt}}
\def\Large{\@setfontsize\Large{14pt}{16}}
\def\LARGE{\@setfontsize\LARGE{15pt}{17pt}}
\def\huge{\@setfontsize\huge{22pt}{22pt}}
\def\Huge{\@setfontsize\Huge{30pt}{30pt}}
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
% Line spacing
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
\renewcommand\baselinestretch{}
% Paragraph dimensions and inter-para spacing
\setlength\parskip{0\p@}
\setlength\parindent{3mm}
% Set inter-para skips
\setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@}
\setlength\medskipamount{6\p@ \@plus 2\p@}
\setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@}
% Page break penalties
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
% Disallow widows and orphans
\clubpenalty 10000
\widowpenalty 10000
% Disable page breaks before equations, allow pagebreaks after
% equations and discourage widow lines before equations.
\displaywidowpenalty 100
\predisplaypenalty 10000
\postdisplaypenalty 2500
% Allow breaking the page in the middle of a paragraph
\interlinepenalty 0
% Disallow breaking the page after a hyphenated line
\brokenpenalty 10000
% Hyphenation; don't split words into less than three characters
\lefthyphenmin=3
\righthyphenmin=3
%
% Set page layout dimensions
%
\setlength\headheight{16\p@} % height of running head
\setlength\topmargin{2.9pc} % head margin
\addtolength\topmargin{-1in} % subtract out the 1 inch driver margin
\setlength\topskip{10\p@} % height of first line of text
\setlength\headsep{19\p@} % space below running head --
\setlength\footskip{34\p@} % space above footer line
\setlength\maxdepth{.5\topskip} % pages can be short or deep by half a line?
\setlength\textwidth{42pc} % text measure excluding margins
\setlength\textheight{58\baselineskip} % 54 lines on a full page,
\addtolength\textheight{\topskip} % including the first
% line on the page
% Set the margins
\setlength\marginparsep{3\p@}
\setlength\marginparpush{3\p@}
\setlength\marginparwidth{35\p@}
\setlength\oddsidemargin{4.5pc}
\addtolength\oddsidemargin{-1in} % subtract out the 1 inch driver margin
\setlength\@tempdima{\paperwidth}
\addtolength\@tempdima{-\textwidth}
\addtolength\@tempdima{-4.5pc}
\setlength\evensidemargin{\@tempdima}
\addtolength\evensidemargin{-1in}
\setlength\columnsep{1.5pc} % space between columns for double-column text
\setlength\columnseprule{0\p@} % width of rule between two columns
% Footnotes
\setlength\footnotesep{9\p@} % space between footnotes
% space between text and footnote
\setlength{\skip\footins}{12\p@ \@plus 6\p@ \@minus 1\p@}
% Float placement parameters
% The total number of floats that can be allowed on a page.
\setcounter{totalnumber}{10}
% The maximum number of floats at the top and bottom of a page.
\setcounter{topnumber}{5}
\setcounter{bottomnumber}{5}
% The maximum part of the top or bottom of a text page that can be
% occupied by floats. This is set so that at least four lines of text
% fit on the page.
\renewcommand\topfraction{.9}
\renewcommand\bottomfraction{.9}
% The minimum amount of a text page that must be occupied by text.
% This should accomodate four lines of text.
\renewcommand\textfraction{.06}
% The minimum amount of a float page that must be occupied by floats.
\renewcommand\floatpagefraction{.94}
% The same parameters repeated for double column output
\renewcommand\dbltopfraction{.9}
\renewcommand\dblfloatpagefraction{.9}
% Space between floats
\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
% Space between floats and text
\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
% Space above and below an inline figure
\setlength\intextsep {18\p@ \@plus 2\p@ \@minus 2\p@}
% For double column floats
\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
% Space left at top, bottom and inbetween floats on a float page.
\setlength\@fptop{0\p@} % no space above float page figures
\setlength\@fpsep{12\p@ \@plus 1fil}
\setlength\@fpbot{0\p@}
% The same for double column
\setlength\@dblfptop{0\p@}
\setlength\@dblfpsep{12\p@ \@plus 1fil}
\setlength\@dblfpbot{0\p@}
% Override settings in mathtime back to TeX defaults
\DeclareMathSizes{5} {5} {5} {5}
\DeclareMathSizes{6} {6} {5} {5}
\DeclareMathSizes{7} {7} {5} {5}
\DeclareMathSizes{8} {8} {6} {5}
\DeclareMathSizes{9} {9} {6.5} {5}
\DeclareMathSizes{10} {10} {7.5} {5}
\DeclareMathSizes{12} {12} {9} {7}
% Page styles
\def\ps@headings
{%
\def\@oddfoot{\vbox to 12.5\p@{\hbox{\rule{\textwidth}{0.5\p@}}\vss
\hbox to \textwidth{\hfill\helveticabold\small\thepage}%
}}%
\def\@evenfoot{\vbox to 12.5\p@{\rule{\textwidth}{0.5\p@}\vss
\hbox to \textwidth{\helveticabold\small\thepage\hfill}%
}}%
\def\@evenhead{\vbox{\hbox to \textwidth{\fontsize{8}{10}\selectfont
\helveticabold{\fontshape{it}\selectfont
\strut\leftmark}\hfill}\vspace{6.5\p@}\rule{\textwidth}{0.5\p@}}}%
\def\@oddhead{\vbox{\hbox to \textwidth{\hfill\fontsize{8}{10}\selectfont
\helveticabold{\fontshape{it}\selectfont\strut\rightmark}}%
\vspace{6.5\p@}\rule{\textwidth}{0.5\p@}}}%
\def\titlemark##1{\markboth{##1}{##1}}%
\def\authormark##1{\gdef\leftmark{##1}}%
}
\def\ps@opening
{%
\def\@oddfoot{\vbox to 13\p@{\hbox{\rule{\textwidth}{1\p@}}\vss
\hbox to \textwidth{\helvetica
\fontsize{7}{9}\fontshape{n}\selectfont%
\hfill\small\helveticabold\thepage}%
}}%
\def\@evenfoot{\vbox to 13\p@{\rule{\textwidth}\vss
\hbox to \textwidth{\helvetica\thepage\hfill
\fontsize{7}{9}\fontshape{n}\selectfont}%
}}%
\let\@evenhead\relax
\let\@oddhead\relax}
% Page range
\newif\iflastpagegiven \lastpagegivenfalse
\newcommand\firstpage[1]{%
\gdef\@firstpage{#1}%
\ifnum\@firstpage>\c@page
\setcounter{page}{#1}%
\ClassWarning{BIO}{Increasing pagenumber to \@firstpage}%
\else \ifnum\@firstpage<\c@page
\ClassWarning{BIO}{Firstpage lower than pagenumber}\fi\fi
\xdef\@firstpage{\the\c@page}%
}
\def\@firstpage{1}
\def\pagenumbering#1{%
\global\c@page \@ne
\gdef\thepage{\csname @#1\endcsname \c@page}%
\gdef\thefirstpage{%
\csname @#1\endcsname \@firstpage}%
\gdef\thelastpage{%
\csname @#1\endcsname \@lastpage}%
}
\newcommand\lastpage[1]{\xdef\@lastpage{#1}%
\global\lastpagegiventrue}
\def\@lastpage{0}
\def\setlastpage{\iflastpagegiven\else
\edef\@tempa{@lastpage@}%
\expandafter
\ifx \csname \@tempa \endcsname \relax
\gdef\@lastpage{0}%
\else
\xdef\@lastpage{\@nameuse{@lastpage@}}%
\fi
\fi }
\def\writelastpage{%
\iflastpagegiven \else
\immediate\write\@auxout%
{\string\global\string\@namedef{@lastpage@}{\the\c@page}}%
\fi
}
\def\thepagerange{%
\ifnum\@lastpage =0 {\ \bf ???} \else
\ifnum\@lastpage = \@firstpage \ \thefirstpage\else
\thefirstpage--\thelastpage \fi\fi}
\AtBeginDocument{\setlastpage
\pagenumbering{arabic}%
}
\AtEndDocument{%
\writelastpage
\if@final
\clearemptydoublepage
\else
\clearpage
\fi}
%
% Sectional units
%
% Counters
\newcounter{section}
\newcounter{subsection}[section]
\newcounter{subsubsection}[subsection]
\newcounter{paragraph}[subsubsection]
\newcounter{subparagraph}[paragraph]
\newcounter{figure}
\newcounter{table}
% Form of the numbers
\newcommand\thepage{\arabic{page}}
\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{{\thesection.\arabic{subsection}}}
\renewcommand\thesubsubsection{{\thesubsection.\arabic{subsubsection}}}
\renewcommand\theparagraph{\thesubsubsection.\arabic{paragraph}}
\renewcommand\thesubparagraph{\theparagraph.\arabic{subparagraph}}
\renewcommand\theequation{\arabic{equation}}
% Form of the words
\newcommand\contentsname{Contents}
\newcommand\listfigurename{List of Figures}
\newcommand\listtablename{List of Tables}
\newcommand\partname{Part}
\newcommand\appendixname{Appendix}
\newcommand\abstractname{Abstract}
\newcommand\refname{References}
\newcommand\bibname{References}
\newcommand\indexname{Index}
\newcommand\figurename{Fig.}
\newcommand\tablename{Table}
% Clearemptydoublepage should really clear the running heads too
\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}}
% Frontmatter, mainmatter and backmatter
\newif\if@mainmatter \@mainmattertrue
\newcommand\frontmatter{%
\clearpage
\@mainmatterfalse
\pagenumbering{roman}}
\newcommand\mainmatter{%
\clearpage
\@mainmattertrue
\pagenumbering{arabic}}
\newcommand\backmatter{%
\clearpage
\@mainmatterfalse}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TITLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newlength{\dropfromtop}
\setlength{\dropfromtop}{\z@}
% Application Notes
\newif\if@appnotes
\newcommand{\application}{%
% \setlength{\dropfromtop}{-2.25pc}%
\global\@appnotestrue}
\long\def\title{\@ifnextchar[{\short@title}{\@@title}}
\def\short@title[#1]{\titlemark{#1}\@@@title}
\def\@@title#1{\authormark{#1}\@@@title{#1}}
\long\def\@@@title#1{\gdef\@title{#1}}
\long\def\author{\@ifnextchar[{\short@uthor}{\@uthor}}
\def\short@uthor[#1]{\authormark{#1}\@@author}
\def\@uthor#1{\authormark{#1}\@@author{#1}}
\long\def\@@author#1{\gdef\@author{#1}}
\def\vol#1{\global\def\@vol{#1}}
\def\issue#1{\global\def\@issue{#1}}
\def\address#1{\global\def\@issue{#1}}
\def\history#1{\global\def\@history{#1}}
\def\editor#1{\global\def\@editor{#1}}
\def\pubyear#1{\global\def\@pubyear{#1}}
\def\copyrightyear#1{\global\def\@copyrightyear{#1}}
\def\address#1{\global\def\@address{#1}}
\def\DOI#1{\global\def\@DOI{#1}}
\definecolor{gray}{cmyk}{0, 0, 0, 0.15}
\newlength{\extraspace}
\setlength{\extraspace}{\z@}
\newcommand\maketitle{\par
\begingroup
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
\long\def\@makefntext##1{\parindent 3mm\noindent
% \@textsuperscript{\normalfont\@thefnmark}\raggedright##1}%
\@textsuperscript{\normalfont\@thefnmark}##1}%
\if@twocolumn
\ifnum \col@number=\@ne
\@maketitle
\else
\twocolumn[\@maketitle]%
\fi
\else
\newpage
\global\@topnum\z@ % Prevents figures from going at top of page.
\@maketitle
\fi
\thispagestyle{opening}\@thanks
\endgroup
\setcounter{footnote}{0}%
\global\let\thanks\relax
\global\let\maketitle\relax
\global\let\@maketitle\relax
\global\let\@address\@empty
\global\let\@history\@empty
\global\let\@editor\@empty
\global\let\@thanks\@empty
\global\let\@author\@empty
\global\let\@date\@empty
\global\let\@title\@empty
\global\let\@pubyear\@empty
\global\let\address\relax
\global\let\history\relax
\global\let\editor\relax
\global\let\title\relax
\global\let\author\relax
\global\let\date\relax
\global\let\pubyear\relax
\global\let\@copyrightline\@empty
\global\let\and\relax
\@afterindentfalse\@afterheading
}
\newlength{\aboveskipchk}%for checking oddpage or evenpage top skip
\setlength{\aboveskipchk}{\z@}%
\def\@maketitle{%
\let\footnote\thanks
\clearemptydoublepage
\checkoddpage\ifcpoddpage\setlength{\aboveskipchk}{-3pc}\else\setlength{\aboveskipchk}{-5pc}\fi%for checking oddpage or evenpage top skip%%
\vspace*{\aboveskipchk}%
\vspace{\dropfromtop}%
\hbox to \textwidth{%
{\helvetica\itshape\bfseries\fontsize{19}{12}\selectfont {\color{gray}TECHNICAL NOTES}
\hfil
\if@appnotes APPLICATIONS NOTE\hfil\fi
}%
\enskip \parbox[b]{11.3pc}{%
\helvetica
\flushright\fontsize{8}{10}\fontshape{it}\selectfont
\hfill
}}
\rule{\textwidth}{1\p@}\par%
\helvetica
\hbox to \textwidth{%
\parbox[t]{41pc}{%
\vspace*{1sp}
{\helveticabold\fontsize{16}{21}\selectfont\raggedright \@title \par}%
\vspace{4.5\p@}
{\authoraffliate\fontsize{11}{13}\selectfont\raggedright \@author \par}%
\vspace{4\p@}
{\authoraffliate\fontsize{9}{11}\selectfont\raggedright \@address \par}%
\vspace{4\p@}
%{\helvetica\fontsize{8}{10}\selectfont\raggedright \@history \par}
%\vspace{24\p@}
%{\helvetica\fontsize{10}{12}\selectfont\raggedright \@editor \par}
%\vspace{20\p@}
}%
}
\vspace{4.5\p@}%
\rule{\textwidth}{1\p@}%
\vspace{12\p@ plus 6\p@ minus 6\p@}%
\vspace{\extraspace}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%% Abstract %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\absection}[1]{%
\par\noindent{\bfseries #1}\space\ignorespaces}
\newenvironment{abstract}{%
\begingroup
\let\section\absection
\fontfamily{\sfdefault}\fontsize{8}{11}\sffamily\selectfont
{\fontseries{b}\selectfont ABSTRACT}\par}
{\endgroup\bigskip\@afterheading\@afterindentfalse\vskip 12pt plus 3pt minus 1pt}
% Section macros
% Lowest level heading that takes a number by default
\setcounter{secnumdepth}{3}
\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname\quad}
\def\section{%
\@startsection{section}{1}{\z@}
{-22\p@ plus -3\p@}{3\p@}
{\reset@font\raggedright\helveticabold\fontsize{10}{12}\selectfont\MakeUppercase}}
\def\subsection{%
\@startsection{subsection}{2}{\z@}
{-11\p@ plus -2\p@}{3\p@}
{\reset@font\raggedright\mathversion{bold}\fontseries{b}\fontsize{10}{12}\selectfont}}
\def\subsubsection{%
\@startsection{subsubsection}{3}{\z@}
{-11\p@ plus -1\p@}{-1em}
{\reset@font\normalfont\normalsize\itshape}}
\def\textcolon{\text{\rm :}}
\def\paragraph{%
\@startsection{paragraph}{4}{\z@}
{-6\p@}
{-.4em}
{\reset@font\itshape}}
% ********************
% Figures and tables *
% ********************
% Table and array parameters
\setlength\arraycolsep{.5em}
\setlength\tabcolsep{.5em}
\setlength\arrayrulewidth{.5pt}
\setlength\doublerulesep{2.5pt}
\setlength\extrarowheight{\z@}
\renewcommand\arraystretch{1}
\newlength{\abovecaptionskip}
\newlength{\belowcaptionskip}
\setlength{\abovecaptionskip}{13pt}
\setlength{\belowcaptionskip}{10.5pt}
\long\def\@makecaption#1#2{\vspace{\abovecaptionskip}%
\begingroup
\footnotesize
\textbf{#1.}\enskip{#2}\par
\endgroup}
\long\def\@tablecaption#1#2{%
\begingroup
\footnotesize
\textbf{#1.}\enskip{#2\strut\par}
\endgroup\vspace{\belowcaptionskip}}
% Table rules
\def\toprule{\noalign{\ifnum0=`}\fi\hrule \@height 0.5pt \hrule \@height 6pt \@width 0pt \futurelet
\@tempa\@xhline}
\def\midrule{\noalign{\ifnum0=`}\fi \hrule \@height 6.75pt \@width 0pt \hrule \@height 0.5pt
\hrule \@height 6pt \@width 0pt \futurelet \@tempa\@xhline}
\def\botrule{\noalign{\ifnum0=`}\fi \hrule \@height 5.75pt \@width 0pt \hrule \@height 0.5pt \futurelet
\@tempa\@xhline}
\def\hrulefill{\leavevmode\leaders\hrule height .5pt\hfill\kern\z@}
\def\thefigure{\@arabic\c@figure}
\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{\figurename~\thefigure}
\def\figure{\@float{figure}}
\let\endfigure\end@float
\@namedef{figure*}{\@dblfloat{figure}}
\@namedef{endfigure*}{\end@dblfloat}
\def\thetable{\@arabic\c@table}
\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{Table~\thetable}
\def\table{\let\@makecaption\@tablecaption\let\source\tablesource\@float{table}}
\def\endtable{\end@float}
\@namedef{table*}{\let\@makecaption\@tablecaption\@dblfloat{table}}
\@namedef{endtable*}{\end@dblfloat}
\newif\if@rotate \@rotatefalse
\newif\if@rotatecenter \@rotatecenterfalse
\def\rotatecenter{\global\@rotatecentertrue}
\def\rotateendcenter{\global\@rotatecenterfalse}
\def\rotate{\global\@rotatetrue}
\def\endrotate{\global\@rotatefalse}
\newdimen\rotdimen
\def\rotstart#1{\special{ps: gsave currentpoint currentpoint translate
#1 neg exch neg exch translate}}
\def\rotfinish{\special{ps: currentpoint grestore moveto}}
\def\rotl#1{\rotdimen=\ht#1\advance\rotdimen by \dp#1
\hbox to \rotdimen{\vbox to\wd#1{\vskip \wd#1
\rotstart{270 rotate}\box #1\vss}\hss}\rotfinish}
\def\rotr#1{\rotdimen=\ht #1\advance\rotdimen by \dp#1
\hbox to \rotdimen{\vbox to \wd#1{\vskip \wd#1
\rotstart{90 rotate}\box #1\vss}\hss}\rotfinish}
\newdimen\tempdime
\newbox\temptbox
% From ifmtarg.sty
% Copyright Peter Wilson and Donald Arseneau, 2000
\begingroup
\catcode`\Q=3
\long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil}
\long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4}
\long\gdef\@ifnotmtarg#1{\@xifmtarg#1QQ\@firstofone\@gobble\@nil}
\endgroup
\def\tablesize{\@setfontsize\tablesize{8\p@}{10\p@}}
\newenvironment{processtable}[3]{\setbox\temptbox=\hbox{{\tablesize #2}}%
\tempdime\wd\temptbox\@processtable{#1}{#2}{#3}{\tempdime}}
{\relax}
\newcommand{\@processtable}[4]{%
\if@rotate
\setbox4=\vbox to \hsize{\vss\hbox to \textheight{%
\begin{minipage}{#4}%
\@ifmtarg{#1}{}{\caption{#1}}{\tablesize #2}%
\vskip7\p@\noindent
\parbox{#4}{\fontsize{7}{9}\selectfont #3\par}%
\end{minipage}}\vss}%
\rotr{4}
\else
\hbox to \hsize{\hss\begin{minipage}[t]{#4}%
\vskip2.9pt
\@ifmtarg{#1}{}{\caption{#1}}{\tablesize #2}%
\vskip6\p@\noindent
\parbox{#4}{\fontsize{7}{9}\selectfont #3\par}%
\end{minipage}\hss}\fi}%
\newcolumntype{P}[1]{>{\raggedright\let\\\@arraycr\hangindent1em}p{#1}}
% ******************************
% List numbering and lettering *
% ******************************
\def\labelenumi{{\rm\arabic{enumi}.}}
\def\theenumi{\arabic{enumi}}
\def\labelenumii{{\rm\alph{enumii}.}}
\def\theenumii{\alph{enumii}}
\def\p@enumii{\theenumi}
\def\labelenumiii{{\rm(\arabic{enumiii})}}
\def\theenumiii{\roman{enumiii}}
\def\p@enumiii{\theenumi(\theenumii)}
\def\labelenumiv{{\rm(\arabic{enumiv})}}
\def\theenumiv{\Alph{enumiv}}
\def\p@enumiv{\p@enumiii\theenumiii}
\def\labelitemi{{\small$\bullet$}}
\def\labelitemii{{\small$\bullet$}}
\def\labelitemiii{{\small$\bullet$}}
\def\labelitemiv{{\small$\bullet$}}
\def\@listI{\leftmargin\leftmargini \topsep\medskipamount}
\let\@listi\@listI
\@listi
\def\@listii{\topsep\z@\leftmargin\leftmarginii}
\def\@listiii{\leftmargin\leftmarginiii \topsep\z@}
\def\@listiv{\leftmargin\leftmarginiv \topsep\z@}
\def\@listv{\leftmargin\leftmarginv \topsep\z@}
\def\@listvi{\leftmargin\leftmarginvi \topsep\z@}
\setlength{\leftmargini}{3mm}
\setlength{\leftmarginii}{\z@}
\setlength{\leftmarginiii}{\z@}
\setlength{\leftmarginiv}{\z@}
% Changes to the list parameters for enumerate
\def\enumargs{%
\partopsep \z@
\itemsep 3\p@
\parsep \z@
\labelsep 0.5em
\listparindent \parindent
\itemindent \z@
\topsep 11\p@
}
\def\enumerate{%
\@ifnextchar[{\@numerate}{\@numerate[0]}}
\def\@numerate[#1]{%
\ifnum \@enumdepth >3 \@toodeep\else
\advance\@enumdepth \@ne
\edef\@enumctr{enum\romannumeral\the\@enumdepth}
\list{\csname label\@enumctr\endcsname}{%
\enumargs
\setlength{\leftmargin}{\csname leftmargin\romannumeral\the\@enumdepth\endcsname}
\usecounter{\@enumctr}
\settowidth\labelwidth{#1}
\addtolength{\leftmargin}{\labelwidth}
\addtolength{\leftmargin}{\labelsep}
\def\makelabel##1{\hss \llap{##1}}}%
\fi
}
\let\endenumerate\endlist
% Changes to the list parameters for itemize
\def\itemargs{%
\partopsep \z@
\itemsep 3\p@
\parsep \z@
\labelsep 0.5em
\rightmargin \z@
\listparindent \parindent
\itemindent \z@
\topsep11\p@
}
\def\itemize{%
\@ifnextchar[{\@itemize}{\@itemize[$\bullet$]}}
\def\@itemize[#1]{%
\ifnum \@itemdepth >3 \@toodeep\else
\advance\@itemdepth \@ne
\edef\@itemctr{item\romannumeral\the\@itemdepth}
\list{\csname label\@itemctr\endcsname}{%
\itemargs
\setlength{\leftmargin}{\csname leftmargin\romannumeral\the\@itemdepth\endcsname}
\settowidth\labelwidth{#1}
\addtolength{\leftmargin}{\labelwidth}
\addtolength{\leftmargin}{\labelsep}
\def\makelabel##1{\hss \llap{##1}}}%
\fi
}
\let\enditemize\endlist
\newenvironment{unlist}{%
\begin{list}{}%
{\setlength{\labelwidth}{\z@}%
\setlength{\labelsep}{\z@}%
\setlength{\topsep}{\medskipamount}%
\setlength{\itemsep}{3\p@}%
\setlength{\leftmargin}{2em}%
\setlength{\itemindent}{-2em}}}
{\end{list}}
% ***********************
% Quotes and Quotations *
% ***********************
\def\quotation{\par\begin{list}{}{
\setlength{\topsep}{\medskipamount}
\setlength{\leftmargin}{2em}%
\setlength{\rightmargin}{\z@}%
\setlength\labelwidth{0pt}%
\setlength\labelsep{0pt}%
\listparindent\parindent}%
\item[]}
\def\endquotation{\end{list}}
\let\quote\quotation
\let\endquote\endquotation
\skip\@mpfootins = \skip\footins
\fboxsep=6\p@
\fboxrule=1\p@
% *******************
% Table of contents *
% *******************
\newcommand\@pnumwidth{4em}
\newcommand\@tocrmarg{2.55em plus 1fil}
\newcommand\@dotsep{1000}
\setcounter{tocdepth}{4}
\def\numberline#1{\hbox to \@tempdima{{#1}}}
\def\@authortocline#1#2#3#4#5{%
\vskip 1.5\p@
\ifnum #1>\c@tocdepth \else
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
\parindent #2\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima #3\relax
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\itshape #4}\nobreak
\leaders\hbox{$\m@th
\mkern \@dotsep mu\hbox{.}\mkern \@dotsep
mu$}\hfill
\nobreak
\hb@xt@\@pnumwidth{\hfil}%
\par}%
\fi}
\newcommand*\l@author{\@authortocline{2}{0pt}{30pt}}
\newcommand*\l@section{\@dottedtocline{3}{11pt}{20pt}}
\newcommand*\l@subsection{\@dottedtocline{4}{31pt}{29pt}}
\newcommand*\l@subsubsection[2]{}
% ***********
% Footnotes *
% ***********
\def\footnoterule{\noindent\rule{\columnwidth}{0.5pt}}
\def\@makefnmark{\@textsuperscript{\normalfont\@thefnmark}}%
\newcommand\@makefntext[1]{\noindent{\@makefnmark}\enskip#1}
% ***********
% References *
% ***********
\providecommand{\newblock}{}
\newenvironment{thebibliography}{%
\section{\bibname}%
\begingroup
\small
\begin{list}{}{%
\setlength{\topsep}{\z@}%
\setlength{\labelsep}{\z@}%
\settowidth{\labelwidth}{\z@}%
\setlength{\leftmargin}{4mm}%
\setlength{\itemindent}{-4mm}}\small}
{\end{list}\endgroup}
\RequirePackage{natbib}
% **********
% Appendix *
% **********
\newif\ifappend % Are we in the Appendix?
\def\appendix{\par
\setcounter{section}{0}
\setcounter{subsection}{0}
\appendtrue
}
%Math parameters
\setlength{\jot}{5\p@}
\mathchardef\@m=1500 % adapted value
\def\frenchspacing{\sfcode`\.\@m \sfcode`\?\@m \sfcode`\!\@m
\sfcode`\:\@m \sfcode`\;\@m \sfcode`\,\@m}
% Theorems
\def\th@plain{%
%% \let\thm@indent\noindent % no indent
\thm@headfont{\quad\scshape}% heading font is bold
\thm@notefont{\upshape\mdseries}% same as heading font
\thm@headpunct{.}% no period after heading
\thm@headsep 5\p@ plus\p@ minus\p@\relax
%% \let\thm@swap\@gobble
%% \thm@preskip\topsep
%% \thm@postskip\theorempreskipamount
\itshape % body font
}
\vbadness=9999
\tolerance=9999
\doublehyphendemerits=10000
\doublehyphendemerits 640000 % corresponds to badness 800
\finalhyphendemerits 1000000 % corresponds to badness 1000
\flushbottom
\frenchspacing
\ps@headings
\twocolumn
% Screen PDF compatability
\newcommand{\medline}[1]{%
\unskip\unskip\ignorespaces}
%%%%for smaller size text
\newenvironment{methods}{%
\begingroup
\def\section{%
\@startsection{section}{1}{\z@}
{-24\p@ plus -3\p@}{4\p@}
{\reset@font\raggedright\helveticabold\fontsize{10}{12}\selectfont\MakeUppercase}}
\def\subsection{%
\@startsection{subsection}{2}{\z@}
{-5\p@ plus -2\p@}{4\p@}
{\reset@font\raggedright\mathversion{bold}\fontseries{b}\fontsize{10}{12}\selectfont}}
\def\subsubsection{%
\@startsection{subsubsection}{3}{\z@}
{-6\p@ plus -1\p@}{-1em}
{\reset@font\normalfont\normalsize\itshape}}
\footnotesize
\par}
{\par\endgroup\bigskip\@afterheading\@afterindentfalse}
\graphicspath{{g:/artwork/oup/bioinfo/}}
\language=2
\hyphenation{Figure Table Figures Tables}
\newcommand{\href}[2]{#2}
\renewenvironment{proof}[1][\proofname]{\par
\normalfont \topsep6\p@\@plus6\p@\relax
\labelsep 0.5em
\trivlist
\item[\hskip\labelsep\hskip1em\textsc{#1}.]\ignorespaces
}{\endtrivlist\@endpefalse}
%%Different Bonds
\def\sbond{\ensuremath{\raise.25ex\hbox{${-}\!\!\!\!{-}$}}\kern -.9pt}
\def\dbond{\ensuremath{\raise.25ex\hbox{=$\!$=}}}
\def\tbond{\ensuremath{\raise.20ex\hbox{${\equiv}\!\!\!{\equiv}$}}}
% Author queries
%\fboxsep=4\p@
%\fboxrule=0.5\p@
\newcommand{\query}[2][0pt]{}%
% \marginpar{\vspace*{#1}%
% {\parbox{\marginparwidth}{%
% \raggedright\fontsize{6}{8}\selectfont
% #2}}}}
\renewcommand{\dag}{{\mathversion{normal}$^{\dagger}$}}
\endinput

103
tex/minimap2.bib 100644
View File

@ -0,0 +1,103 @@
@article{Chaisson:2012aa,
Author = {Chaisson, Mark J and Tesler, Glenn},
Journal = {BMC Bioinformatics},
Pages = {238},
Title = {{Mapping single molecule sequencing reads using basic local alignment with successive refinement (BLASR): application and theory}},
Volume = {13},
Year = {2012}}
@article{Liu:2016ab,
Author = {Liu, Bo and Guan, Dengfeng and Teng, Mingxiang and Wang, Yadong},
Journal = {Bioinformatics},
Pages = {1625-31},
Title = {{rHAT}: fast alignment of noisy long reads with regional hashing},
Volume = {32},
Year = {2016}}
@article{Liu:2017aa,
Author = {Liu, Bo and Gao, Yan and Wang, Yadong},
Journal = {Bioinformatics},
Pages = {192-201},
Title = {{LAMSA}: fast split read alignment with long approximate matches},
Volume = {33},
Year = {2017}}
@article{Lin:2017aa,
Author = {Lin, Hsin-Nan and Hsu, Wen-Lian},
Journal = {Bioinformatics},
Title = {Kart: a divide-and-conquer algorithm for {NGS} read alignment},
Year = {2017}}
@article{Li:2013aa,
Author = {Li, Heng},
Journal = {arXiv:1303.3997},
Title = {Aligning sequence reads, clone sequences and assembly contigs with {BWA-MEM}},
archivePrefix = "arXiv",
eprint = {0902.0885},
primaryClass = "q-bio",
Year = {2013}}
@article{Sovic:2016aa,
Author = {Sovi{\'c}, Ivan and {\v S}iki{\'c}, Mile and Wilm, Andreas and Fenlon, Shannon Nicole and Chen, Swaine and others},
Journal = {Nat Commun},
Pages = {11307},
Title = {Fast and sensitive mapping of nanopore sequencing reads with {GraphMap}},
Volume = {7},
Year = {2016}}
@article{Langmead:2012fk,
Author = {Langmead, Ben and Salzberg, Steven L},
Journal = {Nat Methods},
Pages = {357-9},
Title = {Fast gapped-read alignment with {Bowtie} 2},
Volume = {9},
Year = {2012}}
@article{Li:2016aa,
Author = {Li, Heng},
Journal = {Bioinformatics},
Pages = {2103-10},
Title = {Minimap and miniasm: fast mapping and de novo assembly for noisy long sequences},
Volume = {32},
Year = {2016}}
@misc{Suzuki:2016,
title = {Fast and accurate alignment tool for PacBio and Nanopore long reads},
author = {Hajime Suzuki},
journal = {Unpublished},
howpublished = {\href{https://github.com/ocxtal/minialign}{https://github.com/ocxtal/minialign}},
year = {2016}}
@article{Miller:1988aa,
Author = {Miller, W and Myers, E W},
Journal = {Bull Math Biol},
Number = {2},
Pages = {97-120},
Title = {Sequence comparison with concave weighting functions},
Volume = {50},
Year = {1988}}
@article{Gotoh:1990aa,
Author = {Gotoh, O},
Journal = {Bull Math Biol},
Pages = {359-73},
Title = {Optimal sequence alignment allowing for long gaps},
Volume = {52},
Year = {1990}}
@article{Wu:1996aa,
Author = {Wu, Sun and Manber, U and Myers, Gene},
Journal = {Algorithmica},
Pages = {50-67},
Title = {A subquadratic algorithm for approximate limited expression matching},
Volume = {15},
Year = {1996}}
@article{Daily:2016aa,
Author = {Daily, Jeff},
Journal = {BMC Bioinformatics},
Month = {Feb},
Pages = {81},
Title = {Parasail: SIMD C library for global, semi-global, and local pairwise sequence alignments},
Volume = {17},
Year = {2016}}

180
tex/minimap2.tex 100644
View File

@ -0,0 +1,180 @@
\documentclass{bioinfo}
\copyrightyear{2017}
\pubyear{2017}
\usepackage{hyperref}
\usepackage{url}
\usepackage{amsmath}
\usepackage[ruled,vlined]{algorithm2e}
\newcommand\mycommfont[1]{\footnotesize\rmfamily{\it #1}}
\SetCommentSty{mycommfont}
\SetKwComment{Comment}{$\triangleright$\ }{}
\usepackage{natbib}
\bibliographystyle{apalike}
\usepackage{hyperref}
\DeclareMathOperator*{\argmax}{argmax}
\begin{document}
\firstpage{1}
\title[Long-read and assembly alignment with minimap2]{Minimap2: fast sequence alignment for long noisy reads and assembly contigs}
\author[Li]{Heng Li}
\address{Broad Institute, 415 Main Street, Cambridge, MA 02142, USA}
\maketitle
\begin{abstract}
\section{Summary:} Minimap2 is a program to align long noisy sequences against
a large reference database. It targets query sequences of 1kb--100Mb in length
with sequence divergence typically below 25\%. Minimap2 is $\sim$30 times
faster than most existing long-read aligners and achieves higher accuracy on
simulated data. It also employs concave gap cost and rescues inversions for
improved alignment around potential structural variations.
\section{Availability and implementation:}
\href{https://github.com/lh3/minimap2}{https://github.com/lh3/minimap2}
\section{Contact:} hengli@broadinstitute.org
\end{abstract}
\section{Introduction}
Single Molecule Real-Time (SMRT) sequencing technology and Oxford Nanopore
technologies (ONT) produce reads over 10kbp in length at an error rate
$\sim$15\%. Several aligners have been developed for such
data~\citep{Chaisson:2012aa,Li:2013aa,Liu:2016ab,Sovic:2016aa,Liu:2017aa,Lin:2017aa}.
They are usually five times as slow as mainstream short-read
aligners~\citep{Langmead:2012fk,Li:2013aa}. We speculated there could be
substantial room for speedup on the thought that 10kb long sequences should be
easier to map than 100bp reads because we can more effectively skip repetitive
regions and dramatically reduce computation. We confirmed our speculation by
achieving approximate mapping 50 times faster than BWA-MEM~\citep{Li:2016aa}.
\citet{Suzuki:2016} extended our work with with a fast and novel algorithm on
generating detailed alignment, which in turn inspired us to develop minimap2
towards higher accuracy.
\begin{methods}
\section{Methods}
Minimap2 is the successor of minimap~\citep{Li:2016aa}. It uses similar
indexing and seeding algorithms except that minimap2 optionally uses
homopolymer-compressed (HPC; cite) $k$-mers in addition to normal $k$-mers.
Indexing with HPC $k$-mers leads to higher mapping sensitivity for SMRT reads.
Minimap2 further implements a more accurate chaining algorithm and adds
the ability to produce detailed alignment.
\subsection{Chaining}
\subsubsection{Chaining}
An \emph{anchor} is a 3-tuple $(x,y,w)$, indicating interval $[x-w+1,x]$ on the
reference matching interval $[y-w+1,y]$ on the query. Given a list of anchors
sorted by the ending reference position $x$, let $f(i)$ be the maximal chaining
score up to the $i$-th anchor in the list. $f(i)$ can be calculated with
dynamic programming (DP):
\begin{equation}\label{eq:chain}
f(i)=\max\big\{\max_{i>j\ge 1} \{ f(j)+d(j,i)-\gamma(j,i) \},w_i\big\}
\end{equation}
where $d(j,i)=\min\big\{\min\{y_i-y_j,x_i-x_j\},w_i\big\}$ is the number of
matching bases between the two anchors. $\gamma(j,i)>0$ is the gap cost. It
equals $\infty$ if $y_j\ge y_i$ or $\max\{y_i-y_j,x_i-x_j\}>G$ (i.e. the
distance between two anchors is too large); otherwise
\[
\gamma(j,i)=\gamma'(\max\{y_i-y_j,x_i-x_j\}-\min\{y_i-y_j,x_i-x_j\})
\]
In implementation, a gap of length $l$ costs $\gamma'(l)=\alpha\cdot
l+\beta\log_2(l)$, which is concave. For $m$ anchors, computing all $f(\cdot)$
with Eq.~(\ref{eq:chain}) takes $O(m^2)$ time. We note that if anchor $i$ is
appended to $j$, appending $i$ to a predecessor of $j$ is likely to yield a
lower score. When evaluating Eq.~(\ref{eq:chain}), we start from anchor $i-1$
and stop the evaluation if we cannot find a better $\max$ after up to $h$
iterations. This heuristic reduces the average time to $O(h\cdot m)$. In
practical, we can almost always find the optimal chain with $h=50$; even if the
heuristic fails, the optimal chain often looks dubious.
\subsubsection{Backtracking}
Let $P(i)$ be the index of the best predecessor of anchor $i$. It equals 0 if
$f(i)=w_i$ or $\argmax_j\{f(j)+\eta(j,i)-\gamma(j,i)\}$ otherwise. For each
anchor $i$ in the descending order of $f(i)$, we mark $i$ as `used' and apply
$P(\cdot)$ repeatedly to find its predecessor. This process stops at $P(j)=0$
or at a `used' $j$. This way we find all chains with no anchors used in
more than one chains.
\subsection{Alignment}
Minimap2 performs DP to align sequences between adjacent anchors in a chain. It
adopted difference-based formulation to derive
alignment~\citep{Wu:1996aa,Suzuki:2016}. When combined with SSE vectorization,
this formulation has two advantages. First, because each score in the DP matrix
is bounded by the gap cost and the maximum matching score, we can usually
achieve 16-way SSE vectorization regardless of the peak score of the
alignment. Second, filling the DP matrix along the diagonal, we can simplify
banded alignment, which is critical to performance. In practice, our
implementation is three times as fast as Parasail's 4-way
vectorization~\citep{Daily:2016aa} for global alignment.
Minimap2 uses a 2-piece affine gap cost~\citep{Gotoh:1990aa}:
\[
\gamma(l)=\min\{q+l\cdot e,\tilde{q}+l\cdot\tilde{e}\}
\]
On the condition that $q+e<\tilde{q}+\tilde{e}$ and $e>\tilde{e}$, this
cost function is concave. It applies cost $q+l\cdot e$ to gaps shorter than
$\lceil(\tilde{q}-q)/(e-\tilde{e})\rceil$ and applies
$\tilde{q}+l\cdot\tilde{e}$ to longer gaps. This scheme helps to recover
longer insertions and deletions.
%\begin{equation}\label{eq:ae86}
%\left\{\begin{array}{l}
%H_{ij} = \max\{H_{i-1,j-1}+s(i,j),E_{ij},F_{ij},\tilde{E}_{ij},\tilde{F}_{ij}\}\\
%E_{i+1,j}= \max\{H_{ij}-q,E_{ij}\}-e\\
%F_{i,j+1}= \max\{H_{ij}-q,F_{ij}\}-e\\
%\tilde{E}_{i+1,j}= \max\{H_{ij}-\tilde{q},\tilde{E}_{ij}\}-\tilde{e}\\
%\tilde{F}_{i,j+1}= \max\{H_{ij}-\tilde{q},\tilde{F}_{ij}\}-\tilde{e}
%\end{array}\right.
%\end{equation}
%where $s(i,j)$ is the score between the $i$-th reference base and $j$-th query
%base. If we define~\citep{Wu:1996aa,Suzuki:2016}
%\[
%\left\{\begin{array}{ll}
%u_{ij}\triangleq H_{ij}-H_{i-1,j} & v_{ij}\triangleq H_{ij}-H_{i,j-1} \\
%x_{ij}\triangleq E_{i+1,j}-H_{ij} & \tilde{x}_{ij}\triangleq \tilde{E}_{i+1,j}-\tilde{H}_{ij} \\
%y_{ij}\triangleq F_{i,j+1}-H_{ij} & \tilde{y}_{ij}\triangleq \tilde{F}_{i,j+1}-\tilde{H}_{ij}
%\end{array}\right.
%\]
%we can transform Eq.~(\ref{eq:ae86}) to
%\[
%\left\{\begin{array}{lll}
%z_{ij}&=&\max\{s(i,j),x_{i-1,j}+v_{i-1,j},y_{i,j-1}+u_{i,j-1},\\
%&&\tilde{x}_{i-1,j}+v_{i-1,j},\tilde{y}_{i,j-1}+u_{i,j-1}\}\\
%u_{ij}&=&z_{ij}-v_{i-1,j}\\
%v_{ij}&=&z_{ij}-u_{i,j-1}\\
%x_{ij}&=&\max\{0,x_{i-1,j}+v_{i-1,j}-z_{ij}+q\}-q-e\\
%y_{ij}&=&\max\{0,y_{i,j-1}+u_{i,j-1}-z_{ij}+q\}-q-e\\
%\tilde{x}_{ij}&=&\max\{0,\tilde{x}_{i-1,j}+v_{i-1,j}-z_{ij}+\tilde{q}\}-\tilde{q}-\tilde{e}\\
%\tilde{y}_{ij}&=&\max\{0,\tilde{y}_{i,j-1}+u_{i,j-1}-z_{ij}+\tilde{q}\}-\tilde{q}-\tilde{e}
%\end{array}\right.
%\]
%with boundary conditions
%\[
%\left\{\begin{array}{l}
%x_{-1,\cdot}=y_{\cdot,-1}=-q-e\\
%\tilde{x}_{-1,\cdot}=\tilde{y}_{\cdot,-1}=-\tilde{q}-\tilde{e}\\
%u_{i,-1}=\eta(i)\\
%v_{-1,j}=\eta(j)
%\end{array}\right.
%\]
%where
%\[
%\eta(k)=\left\{\begin{array}{ll}
%-q-e & (k=0) \\
%-e & (k<\lceil\frac{\tilde{q}-q}{e-\tilde{e}}-1\rceil) \\
%i\cdot(e-\tilde{e})-(\tilde{q}-q)-\tilde{e} & (k=\lceil\frac{\tilde{q}-q}{e-\tilde{e}}-1\rceil) \\
%-\tilde{e} & (k>\lceil\frac{\tilde{q}-q}{e-\tilde{e}}-1\rceil)
%\end{array}\right.
%\]
\end{methods}
\bibliography{minimap2}
\end{document}

1288
tex/natbib.bst 100644

File diff suppressed because it is too large Load Diff

803
tex/natbib.sty 100644
View File

@ -0,0 +1,803 @@
%%
%% This is file `natbib.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% natbib.dtx (with options: `package,all')
%% =============================================
%% IMPORTANT NOTICE:
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
%%
%% This is a generated file.
%% It may not be distributed without the original source file natbib.dtx.
%%
%% Full documentation can be obtained by LaTeXing that original file.
%% Only a few abbreviated comments remain here to describe the usage.
%% =============================================
%% Copyright 1993-2000 Patrick W Daly
%% Max-Planck-Institut f\"ur Aeronomie
%% Max-Planck-Str. 2
%% D-37191 Katlenburg-Lindau
%% Germany
%% E-mail: daly@linmpi.mpg.de
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{natbib}
[2000/07/24 7.0a (PWD)]
% This package reimplements the LaTeX \cite command to be used for various
% citation styles, both author-year and numerical. It accepts BibTeX
% output intended for many other packages, and therefore acts as a
% general, all-purpose citation-style interface.
%
% With standard numerical .bst files, only numerical citations are
% possible. With an author-year .bst file, both numerical and
% author-year citations are possible.
%
% If author-year citations are selected, \bibitem must have one of the
% following forms:
% \bibitem[Jones et al.(1990)]{key}...
% \bibitem[Jones et al.(1990)Jones, Baker, and Williams]{key}...
% \bibitem[Jones et al., 1990]{key}...
% \bibitem[\protect\citeauthoryear{Jones, Baker, and Williams}{Jones
% et al.}{1990}]{key}...
% \bibitem[\protect\citeauthoryear{Jones et al.}{1990}]{key}...
% \bibitem[\protect\astroncite{Jones et al.}{1990}]{key}...
% \bibitem[\protect\citename{Jones et al., }1990]{key}...
% \harvarditem[Jones et al.]{Jones, Baker, and Williams}{1990}{key}...
%
% This is either to be made up manually, or to be generated by an
% appropriate .bst file with BibTeX.
% Author-year mode || Numerical mode
% Then, \citet{key} ==>> Jones et al. (1990) || Jones et al. [21]
% \citep{key} ==>> (Jones et al., 1990) || [21]
% Multiple citations as normal:
% \citep{key1,key2} ==>> (Jones et al., 1990; Smith, 1989) || [21,24]
% or (Jones et al., 1990, 1991) || [21,24]
% or (Jones et al., 1990a,b) || [21,24]
% \cite{key} is the equivalent of \citet{key} in author-year mode
% and of \citep{key} in numerical mode
% Full author lists may be forced with \citet* or \citep*, e.g.
% \citep*{key} ==>> (Jones, Baker, and Williams, 1990)
% Optional notes as:
% \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
% \citep[e.g.,][]{key} ==>> (e.g., Jones et al., 1990)
% \citep[see][pg. 34]{key}==>> (see Jones et al., 1990, pg. 34)
% (Note: in standard LaTeX, only one note is allowed, after the ref.
% Here, one note is like the standard, two make pre- and post-notes.)
% \citealt{key} ==>> Jones et al. 1990
% \citealt*{key} ==>> Jones, Baker, and Williams 1990
% \citealp{key} ==>> Jones et al., 1990
% \citealp*{key} ==>> Jones, Baker, and Williams, 1990
% Additional citation possibilities (both author-year and numerical modes)
% \citeauthor{key} ==>> Jones et al.
% \citeauthor*{key} ==>> Jones, Baker, and Williams
% \citeyear{key} ==>> 1990
% \citeyearpar{key} ==>> (1990)
% \citetext{priv. comm.} ==>> (priv. comm.)
% Note: full author lists depends on whether the bib style supports them;
% if not, the abbreviated list is printed even when full requested.
%
% For names like della Robbia at the start of a sentence, use
% \Citet{dRob98} ==>> Della Robbia (1998)
% \Citep{dRob98} ==>> (Della Robbia, 1998)
% \Citeauthor{dRob98} ==>> Della Robbia
%
%
% Citation aliasing is achieved with
% \defcitealias{key}{text}
% \citetalias{key} ==>> text
% \citepalias{key} ==>> (text)
%
% Defining the citation style of a given bib style:
% Use \bibpunct (in the preamble only) with 6 mandatory arguments:
% 1. opening bracket for citation
% 2. closing bracket
% 3. citation separator (for multiple citations in one \cite)
% 4. the letter n for numerical styles, s for superscripts
% else anything for author-year
% 5. punctuation between authors and date
% 6. punctuation between years (or numbers) when common authors missing
% One optional argument is the character coming before post-notes. It
% appears in square braces before all other arguments. May be left off.
% Example (and default) \bibpunct[, ]{(}{)}{;}{a}{,}{,}
%
% To make this automatic for a given bib style, named newbib, say, make
% a local configuration file, natbib.cfg, with the definition
% \newcommand{\bibstyle@newbib}{\bibpunct...}
% Then the \bibliographystyle{newbib} will cause \bibstyle@newbib to
% be called on THE NEXT LATEX RUN (via the aux file).
%
% Such preprogrammed definitions may be invoked in the text (preamble only)
% by calling \citestyle{newbib}. This is only useful if the style specified
% differs from that in \bibliographystyle.
%
% With \citeindextrue and \citeindexfalse, one can control whether the
% \cite commands make an automatic entry of the citation in the .idx
% indexing file. For this, \makeindex must also be given in the preamble.
%
% LaTeX2e Options: (for selecting punctuation)
% round - round parentheses are used (default)
% square - square brackets are used [option]
% curly - curly braces are used {option}
% angle - angle brackets are used <option>
% colon - multiple citations separated by colon (default)
% comma - separated by comma
% authoryear - selects author-year citations (default)
% numbers- selects numerical citations
% super - numerical citations as superscripts
% sort - sorts multiple citations according to order in ref. list
% sort&compress - like sort, but also compresses numerical citations
% longnamesfirst - makes first citation full author list
% sectionbib - puts bibliography in a \section* instead of \chapter*
% Punctuation so selected dominates over any predefined ones.
% LaTeX2e options are called as, e.g.
% \usepackage[square,comma]{natbib}
% LaTeX the source file natbib.dtx to obtain more details
% or the file natnotes.tex for a brief reference sheet.
%-----------------------------------------------------------
\@ifclassloaded{aguplus}{\PackageError{natbib}
{The aguplus class already includes natbib coding,\MessageBreak
so you should not add it explicitly}
{Type <Return> for now, but then later remove\MessageBreak
the command \protect\usepackage{natbib} from the document}
\endinput}{}
\@ifclassloaded{nlinproc}{\PackageError{natbib}
{The nlinproc class already includes natbib coding,\MessageBreak
so you should not add it explicitly}
{Type <Return> for now, but then later remove\MessageBreak
the command \protect\usepackage{natbib} from the document}
\endinput}{}
\@ifclassloaded{egs}{\PackageError{natbib}
{The egs class already includes natbib coding,\MessageBreak
so you should not add it explicitly}
{Type <Return> for now, but then later remove\MessageBreak
the command \protect\usepackage{natbib} from the document}
\endinput}{}
% Define citation punctuation for some author-year styles
% One may add and delete at this point
% Or put additions into local configuration file natbib.cfg
\newcommand\bibstyle@chicago{\bibpunct{(}{)}{;}{a}{,}{,}}
\newcommand\bibstyle@named{\bibpunct{[}{]}{;}{a}{,}{,}}
\newcommand\bibstyle@agu{\bibpunct{[}{]}{;}{a}{,}{,~}}%Amer. Geophys. Union
\newcommand\bibstyle@egs{\bibpunct{(}{)}{;}{a}{,}{,}}%Eur. Geophys. Soc.
\newcommand\bibstyle@agsm{\bibpunct{(}{)}{,}{a}{}{,}\gdef\harvardand{\&}}
\newcommand\bibstyle@kluwer{\bibpunct{(}{)}{,}{a}{}{,}\gdef\harvardand{\&}}
\newcommand\bibstyle@dcu{\bibpunct{(}{)}{;}{a}{;}{,}\gdef\harvardand{and}}
\newcommand\bibstyle@aa{\bibpunct{(}{)}{;}{a}{}{,}} %Astronomy & Astrophysics
\newcommand\bibstyle@pass{\bibpunct{(}{)}{;}{a}{,}{,}}%Planet. & Space Sci
\newcommand\bibstyle@anngeo{\bibpunct{(}{)}{;}{a}{,}{,}}%Annales Geophysicae
\newcommand\bibstyle@nlinproc{\bibpunct{(}{)}{;}{a}{,}{,}}%Nonlin.Proc.Geophys.
% Define citation punctuation for some numerical styles
\newcommand\bibstyle@cospar{\bibpunct{/}{/}{,}{n}{}{}%
\gdef\NAT@biblabelnum##1{##1.}}
\newcommand\bibstyle@esa{\bibpunct{(Ref.~}{)}{,}{n}{}{}%
\gdef\NAT@biblabelnum##1{##1.\hspace{1em}}}
\newcommand\bibstyle@nature{\bibpunct{}{}{,}{s}{}{\textsuperscript{,}}%
\gdef\NAT@biblabelnum##1{##1.}}
% The standard LaTeX styles
\newcommand\bibstyle@plain{\bibpunct{[}{]}{,}{n}{}{,}}
\let\bibstyle@alpha=\bibstyle@plain
\let\bibstyle@abbrv=\bibstyle@plain
\let\bibstyle@unsrt=\bibstyle@plain
% The author-year modifications of the standard styles
\newcommand\bibstyle@plainnat{\bibpunct{[}{]}{,}{a}{,}{,}}
\let\bibstyle@abbrvnat=\bibstyle@plainnat
\let\bibstyle@unsrtnat=\bibstyle@plainnat
\newif\ifNAT@numbers \NAT@numbersfalse
\newif\ifNAT@super \NAT@superfalse
\DeclareOption{numbers}{\NAT@numberstrue
\ExecuteOptions{square,comma,nobibstyle}}
\DeclareOption{super}{\NAT@supertrue\NAT@numberstrue
\renewcommand\NAT@open{}\renewcommand\NAT@close{}
\ExecuteOptions{nobibstyle}}
\DeclareOption{authoryear}{\NAT@numbersfalse
\ExecuteOptions{round,colon,bibstyle}}
\DeclareOption{round}{%
\renewcommand\NAT@open{(} \renewcommand\NAT@close{)}
\ExecuteOptions{nobibstyle}}
\DeclareOption{square}{%
\renewcommand\NAT@open{[} \renewcommand\NAT@close{]}
\ExecuteOptions{nobibstyle}}
\DeclareOption{angle}{%
\renewcommand\NAT@open{$<$} \renewcommand\NAT@close{$>$}
\ExecuteOptions{nobibstyle}}
\DeclareOption{curly}{%
\renewcommand\NAT@open{\{} \renewcommand\NAT@close{\}}
\ExecuteOptions{nobibstyle}}
\DeclareOption{comma}{\renewcommand\NAT@sep{,}
\ExecuteOptions{nobibstyle}}
\DeclareOption{colon}{\renewcommand\NAT@sep{;}
\ExecuteOptions{nobibstyle}}
\DeclareOption{nobibstyle}{\let\bibstyle=\@gobble}
\DeclareOption{bibstyle}{\let\bibstyle=\@citestyle}
\newif\ifNAT@openbib \NAT@openbibfalse
\DeclareOption{openbib}{\NAT@openbibtrue}
\DeclareOption{sectionbib}{\def\NAT@sectionbib{on}}
\def\NAT@sort{0}
\DeclareOption{sort}{\def\NAT@sort{1}}
\DeclareOption{sort&compress}{\def\NAT@sort{2}}
\@ifpackageloaded{cite}{\PackageWarningNoLine{natbib}
{The `cite' package should not be used\MessageBreak
with natbib. Use option `sort' instead}\ExecuteOptions{sort}}{}
\newif\ifNAT@longnames\NAT@longnamesfalse
\DeclareOption{longnamesfirst}{\NAT@longnamestrue}
\DeclareOption{nonamebreak}{\def\NAT@nmfmt#1{\mbox{\NAT@up#1}}}
\def\NAT@nmfmt#1{{\NAT@up#1}}
\renewcommand\bibstyle[1]{\@ifundefined{bibstyle@#1}{\relax}
{\csname bibstyle@#1\endcsname}}
\AtBeginDocument{\global\let\bibstyle=\@gobble}
\let\@citestyle\bibstyle
\newcommand\citestyle[1]{\@citestyle{#1}\let\bibstyle\@gobble}
\@onlypreamble{\citestyle}\@onlypreamble{\@citestyle}
\newcommand\bibpunct[7][, ]%
{\gdef\NAT@open{#2}\gdef\NAT@close{#3}\gdef
\NAT@sep{#4}\global\NAT@numbersfalse\ifx #5n\global\NAT@numberstrue
\else
\ifx #5s\global\NAT@numberstrue\global\NAT@supertrue
\fi\fi
\gdef\NAT@aysep{#6}\gdef\NAT@yrsep{#7}%
\gdef\NAT@cmt{#1}%
\global\let\bibstyle\@gobble
}
\@onlypreamble{\bibpunct}
\newcommand\NAT@open{(} \newcommand\NAT@close{)}
\newcommand\NAT@sep{;}
\ProcessOptions
\newcommand\NAT@aysep{,} \newcommand\NAT@yrsep{,}
\newcommand\NAT@cmt{, }
\newcommand\NAT@cite%
[3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\ \fi
#1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup}
\newcommand\NAT@citenum%
[3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\ \fi
#1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup}
\newcommand\NAT@citesuper[3]{\ifNAT@swa
\unskip\hspace{1\p@}\textsuperscript{#1}%
\if*#3*\else\ (#3)\fi\else #1\fi\endgroup}
\providecommand
\textsuperscript[1]{\mbox{$^{\mbox{\scriptsize#1}}$}}
\providecommand\@firstofone[1]{#1}
\newcommand\NAT@citexnum{}
\def\NAT@citexnum[#1][#2]#3{%
\NAT@sort@cites{#3}%
\let\@citea\@empty
\@cite{\def\NAT@num{-1}\let\NAT@last@yr\relax\let\NAT@nm\@empty
\@for\@citeb:=\NAT@cite@list\do
{\edef\@citeb{\expandafter\@firstofone\@citeb}%
\if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
\@ifundefined{b@\@citeb\@extra@b@citeb}{%
{\reset@font\bfseries?}
\NAT@citeundefined\PackageWarning{natbib}%
{Citation `\@citeb' on page \thepage \space undefined}}%
{\let\NAT@last@num\NAT@num\let\NAT@last@nm\NAT@nm
\NAT@parse{\@citeb}%
\ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
\let\NAT@name=\NAT@all@names
\global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
\fi
\ifNAT@full\let\NAT@nm\NAT@all@names\else
\let\NAT@nm\NAT@name\fi
\ifNAT@swa
\ifnum\NAT@ctype>1\relax\@citea
\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
\ifnum\NAT@ctype=2\relax\NAT@test{\NAT@ctype}%
\else\NAT@alias
\fi\hyper@natlinkend\else
\ifnum\NAT@sort>1
\begingroup\catcode`\_=8
\ifcat _\ifnum\z@<0\NAT@num _\else A\fi
\global\let\NAT@nm=\NAT@num \else \gdef\NAT@nm{-2}\fi
\ifcat _\ifnum\z@<0\NAT@last@num _\else A\fi
\global\@tempcnta=\NAT@last@num \global\advance\@tempcnta by\@ne
\else \global\@tempcnta\m@ne\fi
\endgroup
\ifnum\NAT@nm=\@tempcnta
\ifx\NAT@last@yr\relax
\edef\NAT@last@yr{\@citea \mbox{\noexpand\citenumfont{\NAT@num}}}%
\else
\edef\NAT@last@yr{--\penalty\@m\mbox{\noexpand\citenumfont{\NAT@num}}}%
\fi
\else
\NAT@last@yr \@citea \mbox{\citenumfont{\NAT@num}}%
\let\NAT@last@yr\relax
\fi
\else
\@citea \mbox{\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
{\citenumfont{\NAT@num}}\hyper@natlinkend}%
\fi
\fi
\def\@citea{\NAT@sep\penalty\@m\NAT@space}%
\else
\ifcase\NAT@ctype\relax
\ifx\NAT@last@nm\NAT@nm \NAT@yrsep\penalty\@m\NAT@space\else
\@citea \NAT@test{1}\ \NAT@@open
\if*#1*\else#1\ \fi\fi \NAT@mbox{%
\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
{\citenumfont{\NAT@num}}\hyper@natlinkend}%
\def\@citea{\NAT@@close\NAT@sep\penalty\@m\ }%
\or\@citea
\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
\NAT@test{\NAT@ctype}\hyper@natlinkend
\def\@citea{\NAT@sep\penalty\@m\ }%
\or\@citea
\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
\NAT@test{\NAT@ctype}\hyper@natlinkend
\def\@citea{\NAT@sep\penalty\@m\ }%
\or\@citea
\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
\NAT@alias\hyper@natlinkend
\def\@citea{\NAT@sep\penalty\@m\ }%
\fi
\fi
}}%
\ifnum\NAT@sort>1\relax\NAT@last@yr\fi
\ifNAT@swa\else\ifnum\NAT@ctype=0\if*#2*\else
\NAT@cmt#2\fi \NAT@@close\fi\fi}{#1}{#2}}
\newcommand\NAT@test[1]{\ifnum#1=1 \ifx\NAT@nm\NAT@noname
{\reset@font\bfseries(author?)}\PackageWarning{natbib}
{Author undefined for citation`\@citeb'
\MessageBreak
on page \thepage}\else \NAT@nm \fi
\else \if\relax\NAT@date\relax
{\reset@font\bfseries(year?)}\PackageWarning{natbib}
{Year undefined for citation`\@citeb'
\MessageBreak
on page \thepage}\else \NAT@date \fi \fi}
\let\citenumfont=\relax
\newcommand\NAT@citex{}
\def\NAT@citex%
[#1][#2]#3{%
\NAT@sort@cites{#3}%
\let\@citea\@empty
\@cite{\let\NAT@nm\@empty\let\NAT@year\@empty
\@for\@citeb:=\NAT@cite@list\do
{\edef\@citeb{\expandafter\@firstofone\@citeb}%
\if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
\@ifundefined{b@\@citeb\@extra@b@citeb}{\@citea%
{\reset@font\bfseries ?}\NAT@citeundefined
\PackageWarning{natbib}%
{Citation `\@citeb' on page \thepage \space undefined}\def\NAT@date{}}%
{\let\NAT@last@nm=\NAT@nm\let\NAT@last@yr=\NAT@year
\NAT@parse{\@citeb}%
\ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
\let\NAT@name=\NAT@all@names
\global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
\fi
\ifNAT@full\let\NAT@nm\NAT@all@names\else
\let\NAT@nm\NAT@name\fi
\ifNAT@swa\ifcase\NAT@ctype
\if\relax\NAT@date\relax
\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
\NAT@nmfmt{\NAT@nm}\NAT@date\hyper@natlinkend
\else
\ifx\NAT@last@nm\NAT@nm\NAT@yrsep
\ifx\NAT@last@yr\NAT@year
\hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@exlab
\hyper@natlinkend
\else\unskip\
\hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@date
\hyper@natlinkend
\fi
\else\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
\NAT@nmfmt{\NAT@nm}%
\hyper@natlinkbreak{\NAT@aysep\ }{\@citeb\@extra@b@citeb}%
\NAT@date\hyper@natlinkend
\fi
\fi
\or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
\NAT@nmfmt{\NAT@nm}\hyper@natlinkend
\or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
\NAT@date\hyper@natlinkend
\or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
\NAT@alias\hyper@natlinkend
\fi \def\@citea{\NAT@sep\ }%
\else\ifcase\NAT@ctype
\if\relax\NAT@date\relax
\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
\NAT@nmfmt{\NAT@nm}\hyper@natlinkend
\else
\ifx\NAT@last@nm\NAT@nm\NAT@yrsep
\ifx\NAT@last@yr\NAT@year
\hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@exlab
\hyper@natlinkend
\else\unskip\
\hyper@natlinkstart{\@citeb\@extra@b@citeb}\NAT@date
\hyper@natlinkend
\fi
\else\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
\NAT@nmfmt{\NAT@nm}%
\hyper@natlinkbreak{\ \NAT@@open\if*#1*\else#1\ \fi}%
{\@citeb\@extra@b@citeb}%
\NAT@date\hyper@natlinkend\fi
\fi
\or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
\NAT@nmfmt{\NAT@nm}\hyper@natlinkend
\or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
\NAT@date\hyper@natlinkend
\or\@citea\hyper@natlinkstart{\@citeb\@extra@b@citeb}%
\NAT@alias\hyper@natlinkend
\fi \if\relax\NAT@date\relax\def\@citea{\NAT@sep\ }%
\else\def\@citea{\NAT@@close\NAT@sep\ }\fi
\fi
}}\ifNAT@swa\else\if*#2*\else\NAT@cmt#2\fi
\if\relax\NAT@date\relax\else\NAT@@close\fi\fi}{#1}{#2}}
\newif\ifNAT@par \NAT@partrue
\newcommand\NAT@@open{\ifNAT@par\NAT@open\fi}
\newcommand\NAT@@close{\ifNAT@par\NAT@close\fi}
\newcommand\NAT@alias{\@ifundefined{al@\@citeb\@extra@b@citeb}{%
{\reset@font\bfseries(alias?)}\PackageWarning{natbib}
{Alias undefined for citation `\@citeb'
\MessageBreak on page \thepage}}{\@nameuse{al@\@citeb\@extra@b@citeb}}}
\let\NAT@up\relax
\newcommand\NAT@Up[1]{{\let\protect\@unexpandable@protect\let~\relax
\expandafter\NAT@deftemp#1}\expandafter\NAT@UP\NAT@temp}
\newcommand\NAT@deftemp[1]{\xdef\NAT@temp{#1}}
\newcommand\NAT@UP[1]{\let\@tempa\NAT@UP\ifcat a#1\MakeUppercase{#1}%
\let\@tempa\relax\else#1\fi\@tempa}
\newcommand\shortcites[1]{%
\@bsphack\@for\@citeb:=#1\do
{\edef\@citeb{\expandafter\@firstofone\@citeb}%
\global\@namedef{bv@\@citeb\@extra@b@citeb}{}}\@esphack}
\newcommand\NAT@biblabel[1]{\hfill}
\newcommand\NAT@biblabelnum[1]{\bibnumfmt{#1}}
\newcommand\bibnumfmt[1]{[#1]}
\def\@tempa#1{[#1]}
\ifx\@tempa\@biblabel\let\@biblabel\@empty\fi
\newcommand\NAT@bibsetnum[1]{\settowidth\labelwidth{\@biblabel{#1}}%
\setlength{\leftmargin}{\labelwidth}\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibsep}\setlength{\parsep}{\z@}%
\ifNAT@openbib
\addtolength{\leftmargin}{4mm}%
\setlength{\itemindent}{-4mm}%
\setlength{\listparindent}{\itemindent}%
\setlength{\parsep}{0pt}%
\fi
}
\newlength{\bibhang}
\setlength{\bibhang}{1em}
\newlength{\bibsep}
{\@listi \global\bibsep\itemsep \global\advance\bibsep by\parsep}
\newcommand\NAT@bibsetup%
[1]{\setlength{\leftmargin}{\bibhang}\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibsep}\setlength{\parsep}{\z@}}
\newcommand\NAT@set@cites{\ifNAT@numbers
\ifNAT@super \let\@cite\NAT@citesuper
\def\NAT@mbox##1{\unskip\nobreak\hspace{1\p@}\textsuperscript{##1}}%
\let\citeyearpar=\citeyear
\let\NAT@space\relax\else
\let\NAT@mbox=\mbox
\let\@cite\NAT@citenum \def\NAT@space{ }\fi
\let\@citex\NAT@citexnum
\ifx\@biblabel\@empty\let\@biblabel\NAT@biblabelnum\fi
\let\@bibsetup\NAT@bibsetnum
\def\natexlab##1{}%
\else
\let\@cite\NAT@cite
\let\@citex\NAT@citex
\let\@biblabel\NAT@biblabel
\let\@bibsetup\NAT@bibsetup
\def\natexlab##1{##1}%
\fi}
\AtBeginDocument{\NAT@set@cites}
\AtBeginDocument{\ifx\SK@def\@undefined\else
\ifx\SK@cite\@empty\else
\SK@def\@citex[#1][#2]#3{\SK@\SK@@ref{#3}\SK@@citex[#1][#2]{#3}}\fi
\ifx\SK@citeauthor\@undefined\def\HAR@checkdef{}\else
\let\citeauthor\SK@citeauthor
\let\citefullauthor\SK@citefullauthor
\let\citeyear\SK@citeyear\fi
\fi}
\AtBeginDocument{\@ifpackageloaded{hyperref}{%
\ifnum\NAT@sort=2\def\NAT@sort{1}\fi}{}}
\newif\ifNAT@full\NAT@fullfalse
\newif\ifNAT@swa
\DeclareRobustCommand\citet
{\begingroup\NAT@swafalse\def\NAT@ctype{0}\NAT@partrue
\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
\newcommand\NAT@citetp{\@ifnextchar[{\NAT@@citetp}{\NAT@@citetp[]}}
\newcommand\NAT@@citetp{}
\def\NAT@@citetp[#1]{\@ifnextchar[{\@citex[#1]}{\@citex[][#1]}}
\DeclareRobustCommand\citep
{\begingroup\NAT@swatrue\def\NAT@ctype{0}\NAT@partrue
\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
\DeclareRobustCommand\cite
{\begingroup\def\NAT@ctype{0}\NAT@partrue\NAT@swatrue
\@ifstar{\NAT@fulltrue\NAT@cites}{\NAT@fullfalse\NAT@cites}}
\newcommand\NAT@cites{\@ifnextchar [{\NAT@@citetp}{%
\ifNAT@numbers\else
\NAT@swafalse
\fi
\NAT@@citetp[]}}
\DeclareRobustCommand\citealt
{\begingroup\NAT@swafalse\def\NAT@ctype{0}\NAT@parfalse
\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
\DeclareRobustCommand\citealp
{\begingroup\NAT@swatrue\def\NAT@ctype{0}\NAT@parfalse
\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
\DeclareRobustCommand\citeauthor
{\begingroup\NAT@swafalse\def\NAT@ctype{1}\NAT@parfalse
\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
\DeclareRobustCommand\Citet
{\begingroup\NAT@swafalse\def\NAT@ctype{0}\NAT@partrue
\let\NAT@up\NAT@Up
\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
\DeclareRobustCommand\Citep
{\begingroup\NAT@swatrue\def\NAT@ctype{0}\NAT@partrue
\let\NAT@up\NAT@Up
\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
\DeclareRobustCommand\Citealt
{\begingroup\NAT@swafalse\def\NAT@ctype{0}\NAT@parfalse
\let\NAT@up\NAT@Up
\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
\DeclareRobustCommand\Citealp
{\begingroup\NAT@swatrue\def\NAT@ctype{0}\NAT@parfalse
\let\NAT@up\NAT@Up
\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
\DeclareRobustCommand\Citeauthor
{\begingroup\NAT@swafalse\def\NAT@ctype{1}\NAT@parfalse
\let\NAT@up\NAT@Up
\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
\DeclareRobustCommand\citeyear
{\begingroup\NAT@swafalse\def\NAT@ctype{2}\NAT@parfalse\NAT@citetp}
\DeclareRobustCommand\citeyearpar
{\begingroup\NAT@swatrue\def\NAT@ctype{2}\NAT@partrue\NAT@citetp}
\newcommand\citetext[1]{\NAT@open#1\NAT@close}
\DeclareRobustCommand\citefullauthor
{\citeauthor*}
\newcommand\defcitealias[2]{%
\@ifundefined{al@#1\@extra@b@citeb}{}
{\PackageWarning{natbib}{Overwriting existing alias for citation #1}}
\@namedef{al@#1\@extra@b@citeb}{#2}}
\DeclareRobustCommand\citetalias{\begingroup
\NAT@swafalse\def\NAT@ctype{3}\NAT@parfalse\NAT@citetp}
\DeclareRobustCommand\citepalias{\begingroup
\NAT@swatrue\def\NAT@ctype{3}\NAT@partrue\NAT@citetp}
\renewcommand\nocite[1]{\@bsphack
\@for\@citeb:=#1\do{%
\edef\@citeb{\expandafter\@firstofone\@citeb}%
\if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
\if*\@citeb\else
\@ifundefined{b@\@citeb\@extra@b@citeb}{%
\NAT@citeundefined \PackageWarning{natbib}%
{Citation `\@citeb' undefined}}{}\fi}%
\@esphack}
\newcommand\NAT@parse[1]{{%
\let\protect=\@unexpandable@protect\let~\relax
\let\active@prefix=\@gobble
\xdef\NAT@temp{\csname b@#1\@extra@b@citeb\endcsname}}%
\expandafter\NAT@split\NAT@temp
\expandafter\NAT@parse@date\NAT@date??????@@%
\ifciteindex\NAT@index\fi
}
\newcommand\NAT@split[4]{%
\gdef\NAT@num{#1}\gdef\NAT@name{#3}\gdef\NAT@date{#2}%
\gdef\NAT@all@names{#4}%
\ifx\NAT@noname\NAT@all@names \gdef\NAT@all@names{#3}\fi}
\newcommand\NAT@parse@date{}
\def\NAT@parse@date#1#2#3#4#5#6@@{%
\ifnum\the\catcode`#1=11\def\NAT@year{}\def\NAT@exlab{#1}\else
\ifnum\the\catcode`#2=11\def\NAT@year{#1}\def\NAT@exlab{#2}\else
\ifnum\the\catcode`#3=11\def\NAT@year{#1#2}\def\NAT@exlab{#3}\else
\ifnum\the\catcode`#4=11\def\NAT@year{#1#2#3}\def\NAT@exlab{#4}\else
\def\NAT@year{#1#2#3#4}\def\NAT@exlab{{#5}}\fi\fi\fi\fi}
\newcommand\NAT@index{}
\let\NAT@makeindex=\makeindex
\renewcommand\makeindex{\NAT@makeindex
\renewcommand\NAT@index{\@bsphack\begingroup
\def~{\string~}\@wrindex{\NAT@idxtxt}}}
\newcommand\NAT@idxtxt{\NAT@name\ \NAT@open\NAT@date\NAT@close}
\@ifundefined{@indexfile}{}{\let\NAT@makeindex\relax\makeindex}
\newif\ifciteindex \citeindexfalse
\newcommand\citeindextype{default}
\newcommand\NAT@index@alt{{\let\protect=\noexpand\let~\relax
\xdef\NAT@temp{\NAT@idxtxt}}\expandafter\NAT@exp\NAT@temp\@nil}
\newcommand\NAT@exp{}
\def\NAT@exp#1\@nil{\mbox{}\index[\citeindextype]{#1}}
\AtBeginDocument{%
\@ifpackageloaded{index}{\let\NAT@index=\NAT@index@alt}{}}
\newcommand\NAT@ifcmd{\futurelet\NAT@temp\NAT@ifxcmd}
\newcommand\NAT@ifxcmd{\ifx\NAT@temp\relax\else\expandafter\NAT@bare\fi}
\def\NAT@bare#1(#2)#3(@)#4\@nil#5{%
\if @#2
\expandafter\NAT@apalk#1, , \@nil{#5}\else
\stepcounter{NAT@ctr}%
\NAT@wrout{\arabic {NAT@ctr}}{#2}{#1}{#3}{#5}
\fi
}
\newcommand\NAT@wrout[5]{%
\if@filesw
{\let\protect\noexpand\let~\relax
\immediate
\write\@auxout{\string\bibcite{#5}{{#1}{#2}{{#3}}{{#4}}}}}\fi
\ignorespaces}
\def\NAT@noname{{}}
\renewcommand\bibitem{%
\@ifnextchar[{\@lbibitem}{%
\global\NAT@stdbsttrue
\stepcounter{NAT@ctr}\@lbibitem[\arabic{NAT@ctr}]}}
\def\@lbibitem[#1]#2{%
\if\relax\@extra@b@citeb\relax\else
\@ifundefined{br@#2\@extra@b@citeb}{}{%
\@namedef{br@#2}{\@nameuse{br@#2\@extra@b@citeb}}}\fi
\@ifundefined{b@#2\@extra@b@citeb}{\def\NAT@num{}}{\NAT@parse{#2}}%
\item[\hfil\hyper@natanchorstart{#2\@extra@b@citeb}\@biblabel{\NAT@num}%
\hyper@natanchorend]%
\NAT@ifcmd#1(@)(@)\@nil{#2}}
\ifx\SK@lbibitem\@undefined\else
\let\SK@lbibitem\@lbibitem
\def\@lbibitem[#1]#2{%
\SK@lbibitem[#1]{#2}\SK@\SK@@label{#2}\ignorespaces}\fi
\newif\ifNAT@stdbst \NAT@stdbstfalse
\AtEndDocument
{\ifNAT@stdbst\if@filesw\immediate\write\@auxout{\string
\global\string\NAT@numberstrue}\fi\fi
}
\providecommand\bibcite{}
\renewcommand\bibcite[2]{\@ifundefined{b@#1\@extra@binfo}\relax
{\NAT@citemultiple
\PackageWarningNoLine{natbib}{Citation `#1' multiply defined}}%
\global\@namedef{b@#1\@extra@binfo}{#2}}
\AtEndDocument{\NAT@swatrue\let\bibcite\NAT@testdef}
\newcommand\NAT@testdef[2]{%
\def\NAT@temp{#2}\expandafter \ifx \csname b@#1\@extra@binfo\endcsname
\NAT@temp \else \ifNAT@swa \NAT@swafalse
\PackageWarningNoLine{natbib}{Citation(s) may have
changed.\MessageBreak
Rerun to get citations correct}\fi\fi}
\newcommand\NAT@apalk{}
\def\NAT@apalk#1, #2, #3\@nil#4{\if\relax#2\relax
\global\NAT@stdbsttrue
\NAT@wrout{#1}{}{}{}{#4}\else
\stepcounter{NAT@ctr}%
\NAT@wrout{\arabic {NAT@ctr}}{#2}{#1}{}{#4}\fi}
\newcommand\citeauthoryear{}
\def\citeauthoryear#1#2#3(@)(@)\@nil#4{\stepcounter{NAT@ctr}\if\relax#3\relax
\NAT@wrout{\arabic {NAT@ctr}}{#2}{#1}{}{#4}\else
\NAT@wrout{\arabic {NAT@ctr}}{#3}{#2}{#1}{#4}\fi}
\newcommand\citestarts{\NAT@open}
\newcommand\citeends{\NAT@close}
\newcommand\betweenauthors{and}
\newcommand\astroncite{}
\def\astroncite#1#2(@)(@)\@nil#3{\stepcounter{NAT@ctr}\NAT@wrout{\arabic
{NAT@ctr}}{#2}{#1}{}{#3}}
\newcommand\citename{}
\def\citename#1#2(@)(@)\@nil#3{\expandafter\NAT@apalk#1#2, \@nil{#3}}
\newcommand\harvarditem[4][]%
{\if\relax#1\relax\bibitem[#2(#3)]{#4}\else
\bibitem[#1(#3)#2]{#4}\fi }
\newcommand\harvardleft{\NAT@open}
\newcommand\harvardright{\NAT@close}
\newcommand\harvardyearleft{\NAT@open}
\newcommand\harvardyearright{\NAT@close}
\AtBeginDocument{\providecommand{\harvardand}{and}}
\newcommand\harvardurl[1]{\textbf{URL:} \textit{#1}}
\providecommand\bibsection{}
\@ifundefined{chapter}%
{\renewcommand\bibsection{\section*{\refname
\@mkboth{\MakeUppercase{\refname}}{\MakeUppercase{\refname}}}}}
{\@ifundefined{NAT@sectionbib}%
{\renewcommand\bibsection{\chapter*{\bibname
\@mkboth{\MakeUppercase{\bibname}}{\MakeUppercase{\bibname}}}}}
{\renewcommand\bibsection{\section*{\bibname
\ifx\@mkboth\@gobbletwo\else\markright{\MakeUppercase{\bibname}}\fi}}}}
\@ifclassloaded{amsart}%
{\renewcommand\bibsection{\section*{\refname}}}{}
\@ifclassloaded{amsbook}%
{\renewcommand\bibsection{\chapter*{\bibname}}}{}
\@ifundefined{bib@heading}{}{\let\bibsection\bib@heading}
\newcounter{NAT@ctr}
\renewenvironment{thebibliography}[1]{%
\bibsection
\vspace{1\p@}\parindent \z@\bibpreamble\bibfont\list
{\@biblabel{\arabic{NAT@ctr}}}{\@bibsetup{#1}%
\setcounter{NAT@ctr}{0}}%
\ifNAT@openbib
\renewcommand\newblock{\par}
\else
\renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
\fi
\sloppy\clubpenalty4000\widowpenalty4000
\sfcode`\.=1000\relax
\let\citeN\cite \let\shortcite\cite
\let\citeasnoun\cite\fontsize{7}{9}\selectfont
}{\def\@noitemerr{%
\PackageWarning{natbib}
{Empty `thebibliography' environment}}%
\endlist\vskip-\lastskip}
\let\bibfont\relax
\let\bibpreamble\relax
\providecommand\reset@font{\relax}
\providecommand\bibname{Bibliography}
\providecommand\refname{References}
\newcommand\NAT@citeundefined{\gdef \NAT@undefined {%
\PackageWarningNoLine{natbib}{There were undefined citations}}}
\let \NAT@undefined \relax
\newcommand\NAT@citemultiple{\gdef \NAT@multiple {%
\PackageWarningNoLine{natbib}{There were multiply defined citations}}}
\let \NAT@multiple \relax
\AtEndDocument{\NAT@undefined\NAT@multiple}
\providecommand\@mkboth[2]{}
\providecommand\MakeUppercase{\uppercase}
\providecommand{\@extra@b@citeb}{}
\gdef\@extra@binfo{}
\providecommand\hyper@natanchorstart[1]{}
\providecommand\hyper@natanchorend{}
\providecommand\hyper@natlinkstart[1]{}
\providecommand\hyper@natlinkend{}
\providecommand\hyper@natlinkbreak[2]{#1}
\@ifundefined{bbl@redefine}{}{%
\bbl@redefine\nocite#1{%
\@safe@activestrue\org@nocite{#1}\@safe@activesfalse}%
\bbl@redefine\@lbibitem[#1]#2{%
\@safe@activestrue\org@@lbibitem[#1]{#2}\@safe@activesfalse}%
}
\AtBeginDocument{\@ifundefined{bbl@redefine}{}{%
\bbl@redefine\@citex[#1][#2]#3{%
\@safe@activestrue\org@@citex[#1][#2]{#3}\@safe@activesfalse}%
\bbl@redefine\NAT@testdef#1#2{%
\@safe@activestrue\org@NAT@testdef{#1}{#2}\@safe@activesfalse}%
\@ifundefined{org@@lbibitem}{%
\bbl@redefine\@lbibitem[#1]#2{%
\@safe@activestrue\org@@lbibitem[#1]{#2}\@safe@activesfalse}}{}%
}}
\ifnum\NAT@sort>0
\newcommand\NAT@sort@cites[1]{%
\@tempcntb\m@ne
\let\@celt\delimiter
\def\NAT@num@list{}%
\def\NAT@cite@list{}%
\def\NAT@nonsort@list{}%
\@for \@citeb:=#1\do{\NAT@make@cite@list}%
\edef\NAT@cite@list{\NAT@cite@list\NAT@nonsort@list}%
\edef\NAT@cite@list{\expandafter\NAT@xcom\NAT@cite@list @@}}
\begingroup \catcode`\_=8
\gdef\NAT@make@cite@list{%
\edef\@citeb{\expandafter\@firstofone\@citeb}%
\@ifundefined{b@\@citeb\@extra@b@citeb}{\def\NAT@num{A}}%
{\NAT@parse{\@citeb}}%
\ifcat _\ifnum\z@<0\NAT@num _\else A\fi
\@tempcnta\NAT@num \relax
\ifnum \@tempcnta>\@tempcntb
\edef\NAT@num@list{\NAT@num@list \@celt{\NAT@num}}%
\edef\NAT@cite@list{\NAT@cite@list\@citeb,}%
\@tempcntb\@tempcnta
\else
\let\NAT@@cite@list=\NAT@cite@list \def\NAT@cite@list{}%
\edef\NAT@num@list{\expandafter\NAT@num@celt \NAT@num@list \@gobble @}%
{\let\@celt=\NAT@celt\NAT@num@list}%
\fi
\else
\edef\NAT@nonsort@list{\NAT@nonsort@list\@citeb,}%
\fi}
\endgroup
\def\NAT@celt#1{\ifnum #1<\@tempcnta
\xdef\NAT@cite@list{\NAT@cite@list\expandafter\NAT@nextc\NAT@@cite@list @@}%
\xdef\NAT@@cite@list{\expandafter\NAT@restc\NAT@@cite@list}%
\else
\xdef\NAT@cite@list{\NAT@cite@list\@citeb,\NAT@@cite@list}\let\@celt\@gobble%
\fi}
\def\NAT@num@celt#1#2{\ifx \@celt #1%
\ifnum #2<\@tempcnta
\@celt{#2}%
\expandafter\expandafter\expandafter\NAT@num@celt
\else
\@celt{\number\@tempcnta}\@celt{#2}%
\fi\fi}
\def\NAT@nextc#1,#2@@{#1,}
\def\NAT@restc#1,#2{#2}
\def\NAT@xcom#1,@@{#1}
\else
\newcommand\NAT@sort@cites[1]{\edef\NAT@cite@list{#1}}\fi
\InputIfFileExists{natbib.cfg}
{\typeout{Local config file natbib.cfg used}}{}
%%
%% <<<<< End of generated file <<<<<<
%%
%% End of file `natbib.sty'.