
% This is the file REVTEX.STY
% from version 2.1 of the REVTEX macro package.
%
% This file is part of a compuscript toolbox distributed by
% the American Physical Society in conjunction with
% the TeX author-prepared program.
%
% All rights not specifically granted are reserved.
% (c) American Physical Society, 1991.
%
% Permission is granted to make and distribute verbatim
% copies of the complete toolbox provided that the README file
% and copyright notices are preserved on all copies.
% Permission is granted to use the style files provided that
% neither the content of the style files nor their names are changed.
% APS macros may be used and distributed provided each use is
% accompanied by an appropriate acknowledgment.
%
% For more information, see the README file.
%
% revtex.sty v2.1 (id#1). search for 2.1 for new stuff
\typeout{ <<< REVTEX, v2.1:  Last revision Dec. 12, 1991 >>> }
\typeout{ \space\space<<< \space(c) \space
                           American Physical Society, 1991 >>> }
%% Page parameters
\iftwelvepointon
  \textwidth=6in
  \hoffset=-.5in
  \textheight=8.5in
\else
  \hoffset=-1in
  \textwidth=42.5pc
  \textheight=9.5in
\fi

\voffset=-1.1in

\iftwelvepointon\parindent=2em\else\parindent=1em\fi
\baselineskip.4cm

\global\arraycolsep=1pt% <=  this dimension determines the horizontal
                       %     space found between math expressions in
                       %     array and eqnarray environments.

\newif\ifsectionon

% 2.1
\ifx\selectfont\undefined % ofss.
  \iftwelvepointon
    \def\openone{\leavevmode\hbox{\xipt1\kern-3.8pt\xiipt1}}%
  \else
    \def\openone{\leavevmode\hbox{\ixpt1\kern-3.3pt\xpt1}}%
  \fi
\else % nfss.
  \iftwelvepointon
    \def\openone{\leavevmode\hbox{\small1\kern-3.8pt\normalsize1}}%
  \else
    \def\openone{\leavevmode\hbox{\small1\kern-3.3pt\normalsize1}}%
  \fi
\fi
% old defs.
%\iftwelvepointon
%  \def\openone{\leavevmode\hbox{\xipt1\kern-3.8pt\xiipt1}}%
%\else
%  \def\openone{\leavevmode\hbox{\ixpt1\kern-3.3pt\xpt1}}%
%\fi

\def\@hide#1{}%

%% Section headings: \protect fragile commands

\newif\ifpreprinsty
\newif\iffirstfig  %        Added flags for preprint style
\newif\iftblone
\iftwelvepointon\preprinstytrue\firstfigtrue\tblonetrue\fi

\def\preprint#1{%
\iftwelvepointon{\vskip -.25in\hfill\hfil#1\vskip 10pt}\fi}

\newif\ifnonumber
\def\nonum{\global\nonumbertrue}

\def\section#1{%
  \goodbreak\ifpacson\global\pacsonfalse\else\vspace{16pt}\fi%
  \global\everypar={%
    \nobreak\ifsectionon\global\sectiononfalse\fi\everypar={}}%
  \global\subsecnum=0%
  {\def\\{ }\typeout{**Section: #1**}}%
  \ifsecnumbers\global\c@equation=0\fi%
  \vtop{%
    \parindent=0pt%
    \def\\{\par}\everypar{\hskip\parfillskip\relax}%
    \ifnonumber\else\global\advance\c@secnum by1 \fi%
    \small        %
    \ifnonumber\global\nonumberfalse\else\Roman{secnum}. \fi%
    \uppercase{#1}\vskip12pt}%
  \edef\@currentlabel{\ifappendixon\appletter\fi\Roman{secnum}}%
  \sectionontrue%
}

\def\subsection#1{%
  \goodbreak\ifsectionon\vspace{4pt}\else\vspace{16pt}\fi%
  \global\everypar={%
    \nobreak\ifsectionon\global\sectiononfalse\fi\everypar={}}%
  {\def\\{ }\typeout{**Subsection: #1**}}%
  \global\subsubsecnum=0%
  \vtop{%
    \parindent=0pt\def\\{\par}\everypar{\hskip\parfillskip\relax}%
    \ifnonumber\else\global\advance\subsecnum by1 \fi%
    \small       %
    \ifnonumber%
      \global\nonumberfalse%
    \else%
      \ifappendixon\the\subsecnum\else\uppercase{\sectionalpha}\fi. %
    \fi%
    #1\vskip12pt%
  }%
    \edef\@currentlabel{\ifappendixon\appletter\,\the\subsecnum%
      \else\Roman{secnum}\,\sectionalpha\fi}%
    \global\sectionontrue%
}

\def\subsubsection#1{%
  \goodbreak%
  \ifsectionon\vspace{4pt}\else\vspace{16pt}\fi%
  \global\everypar={%
    \nobreak\ifsectionon\global\sectiononfalse\fi\everypar={}}%
  {\def\\{ }\typeout{**Subsubsection: #1**}}%
  \vtop{%
  \parindent=0pt\def\\{\par}\everypar{\hskip\parfillskip\relax}%
  \ifnonumber\else\global\advance\subsubsecnum by1 \fi%
  \small\it       %
  \ifnonumber%
    \global\nonumberfalse%
  \else%
    \ifappendixon\subsectionalpha\else\the\subsubsecnum\fi. %
  \fi%
  #1\vskip12pt}%
  \edef\@currentlabel{%
    \ifappendixon\appletter\,\the\subsecnum\,\subsectionalpha%
    \else \Roman{secnum}\,\sectionalpha\,\the\subsubsecnum\fi}%
  \global\sectionontrue%
}

\def\acknowledgments{%
\nonum\section{ACKNOWLEDGMENTS}%
}

\let\acknowledgements\acknowledgments

%% Appendix

\newif\ifappendixon
\newcount\appnum

\def\appendix#1{%
  \goodbreak%
  \global\c@equation=0\global\c@secnum=0%
  \global\subsecnum=0\global\subsubsecnum=0%
  \global\appendixontrue%
  \global\everypar={\nobreak\global\appendixontrue\everypar={}}%%
  {\def\\{ }\typeout{**APPENDIX: #1**}}%
  \vtop{%
    \parindent=0pt\def\\{\par}\everypar{\hskip\parfillskip\relax}%
    \global\advance\theappnum by1%
    \small       %
    \def\one{#1}%
    \ifnonumber%
      \uppercase{\vspace{16pt}Appendix\ifx\one\empty\else: \fi}%
      \global\nonumberfalse%
    \else%
      \uppercase{%
        \vspace{16pt}Appendix \appletter\ifx\one\empty\else: \fi}%
    \fi%
    \uppercase{#1}%
    }%
  \global\c@secnum=0%
  \edef\@currentlabel{\appletter}\vskip12pt%
}


\def\unletteredappendix#1{%
  \goodbreak
  \global\c@equation=0 \global\c@secnum=0%
  \global\subsecnum=0\global\subsubsecnum=0% as in \appendix. 010.
  \global\appendixontrue
  \global\theappnum=1%
  \global\everypar={\nobreak\global\appendixontrue\everypar={}}
  {\def\\{ }\typeout{**APPENDIX: #1**}}%
  \vtop{%
    \parindent=0pt \def\\{\par}\everypar{\hskip\parfillskip\relax}%
    \small       %
    \def\one{#1}%
    \ifnonumber \global\nonumberfalse \fi
    \uppercase{\vspace{16pt}Appendix\ifx\one\empty\else: \fi}%
    \uppercase{#1}%
  }%
  \global\c@secnum=0%
  \vskip12pt%
}

%% New commands, not found in standard Latex

%% MATH
\newif\ifsecnumbers
\def\math-with-secnums{\global\secnumberstrue}
\newif\ifindented
\newif\ifrighteq
\global\indentedtrue

\def\FL{\global\indentedfalse}

\def\FR{\global\righteqtrue}

% Note that this command should be used in preamble
\def\tightenlines{\def\baselinestretch{1}}

% For squeezing tables in (mainly) preprint style
\def\squeezetable{\let\small\scriptsize}

\def\eqnarray{%
  \ifmathletters%
    \global\advance\letters by1%
  \else%
    \stepcounter{equation}%
  \fi%
  \global\apsmmodetrue\let\@currentlabel=\theequation%
  \iftwelvepointon
    \global\@eqnswtrue\global\@eqcnt\z@
    \tabskip\@centering\let\\=\@eqncr
    \vskip\abovedisplayskip
    \halign to\hsize\bgroup
      \@eqnsel\hskip\@centering%
      $\displaystyle\tabskip\z@{##}$&%
      \global\@eqcnt\@ne \hskip2\arraycolsep \hfil${##}$\hfil&%
      \global\@eqcnt\tw@ \hskip2\arraycolsep%
      $\displaystyle\tabskip\z@{##}$\hfil%
      \tabskip\@centering&%
      \llap{##}\tabskip\z@\cr
  \else
    \global\@eqnswtrue\global\@eqcnt\z@\tabskip\z@\let\\=\@eqncr%
    \abovedisplayskip\topsep%
    \ifvmode\advance\abovedisplayskip\partopsep\fi %
    \belowdisplayskip\abovedisplayskip		    %
    \belowdisplayshortskip\abovedisplayskip%
    \abovedisplayshortskip\abovedisplayskip%
    \vskip\abovedisplayskip%
    \ifindented\else\global\indentedtrue\placemath=0pt\fi%
    \ifrighteq
      \tabskip\@centering
      \halign to\hsize\bgroup%
        \@eqnsel\hskip\@centering$\displaystyle{##}$\tabskip\z@&%
        \global\@eqcnt\@ne\hskip2\arraycolsep\hfil${##}$\hfil&%
        \global\@eqcnt\tw@\hskip2\arraycolsep$\displaystyle{##}$&%
        \setbox0=\hbox{##}\ifdim\wd0>0pt\hskip10pt\fi%
        \hskip\wd0\hfil\llap{\unhbox0}%
          \tabskip\z@\cr
    \else
      \halign to\hsize\bgroup%
        \@eqnsel\hskip\placemath\hskip\@centering%
          $\displaystyle{##}$\tabskip\z@&%
        \global\@eqcnt\@ne\hskip2\arraycolsep\hfil${##}$\hfil&%
        \global\@eqcnt\tw@\hskip2\arraycolsep$\displaystyle{##}$%
          \hfil\tabskip\@centering&%
        \llap{##}\tabskip\z@\cr
    \fi
  \fi
}

\def\endeqnarray{%
  \global\apsmmodefalse
  \@@eqncr\egroup
  \ifmathletters
    \global\advance\letters\m@ne
  \else
    \global\advance\c@equation\m@ne
  \fi
  \global\righteqfalse
  \vskip\belowdisplayskip
  \noindent\global\@ignoretrue%
}

\newif\ifeqnumset   % global dodge flag for \eqnum.

\def\@@eqncr{%
\let\@tempa\relax %
\ifcase\@eqcnt\def\@tempa{& & &}\or\def\@tempa{& &}%
  \else \def\@tempa{&}\fi %
\@tempa%
\if@eqnsw%
  \ifeqnumset%    all this for \eqnum (!?).
    {\rm(\usernumber)}%
    \global\eqnumsetfalse
  \else
    \@eqnnum%
    \ifmathletters%
      \global\advance\letters by1%
    \else%
      \stepcounter{equation}%
    \fi%
  \fi
\fi%
\global\let\@currentlabel=\theequation%
\global\@eqnswtrue\global\@eqcnt\z@\cr%
}

\def\@eqnnum{{\rm(\theequation)}} % same as latex version

\newif\ifmathletters

\def\mathletters{%
  \global\advance\c@equation by1%
  \global\mathletterstrue\global\letters=0 %
}%% lettered equations

\def\endmathletters{\global\mathlettersfalse\global\@ignoretrue}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Math: Display equations on left margin.
%% \placemath=<dimen> will place math at <dimen> from the left
%% margin.

\newdimen\placemath
\placemath=18.4pt

\def\theeqno{}
\def\eqno#1{%
\gdef\theeqno{#1}%
  \def\@currentlabel{#1}% non-global OK (?).
}

\long\def\catch #1$${%
  \hbox to\textwidth{%
  \iftwelvepointon
    \hss
  \else
    \ifindented%%
      \ifrighteq%
        \global\righteqfalse\hfill%
      \else%
         \hskip\placemath%
      \fi%
    \else%
      \global\indentedtrue%
    \fi%%
  \fi
  $\displaystyle{#1}$\hss%
  \ifx\theeqno\empty%
  \else%
    \setbox0=\hbox{(\theeqno)}\hskip\wd0\ \llap{\box0}%%
  \fi%
  }%%
  \gdef\theeqno{}$$\ignorespaces%
}

\everydisplay={\catch}

%%% Beginning of article
\newcount\c@secnum\c@secnum=0
\newcount\subsecnum\subsecnum=0
\newcount\subsubsecnum\subsubsecnum=0

\def\title{%
\global\c@secnum=0\relax%
\global\subsecnum=0\relax%
\global\subsubsecnum=0\relax%
\bgroup%
\def\\{\par}\everypar{\hskip\parfillskip\relax}%
\large         %
\parindent0pt%
\vrule height1cm width0pt\ignorespaces}

\def\endtitle{\vskip1sp\egroup }

% \moreauthors  no longer necessary, \author will work for
% single and multiple authors.

\def\author#1{%
  \hbox to\textwidth{%
    \hss%
    \vbox{%
      \let\cite\@bylinecite\let\onlinecite\@bylinecite
      \let\citenum\@bylinecite
      \vskip24pt\hsize=.7\hsize
      \let\\=\@centercr
      \hyphenpenalty=10000
      \spaceskip=.3333em \xspaceskip=.5em
      \@rightskip 0pt plus 1filll \rightskip \@rightskip
       \leftskip\rightskip \parindent \z@
      #1\vskip1sp%
      }%
    \hss%
  }%
}

% \moreauthors set to \author for backward compatibility.
\let\moreauthors=\author

% \keywords set to chuck arg for poss. compat.
\def\keywords#1{}

% def's to allow direct use of AMSFonts via their "stand-alone" files
\def\setboxz@h{\setbox0\hbox}
\def\wdz@{\wd0}

\def\instit{%
\bgroup\small\it
\everypar{\hskip\parfillskip\ignorespaces}\def\\{\par}%
\let\cite\@bylinecite\let\onlinecite\@bylinecite
\let\citenum\@bylinecite \parindent0pt} %

\def\endinstit{\vskip1sp\egroup }

\def\receipt#1{\hbox to\textwidth{\small\hss(Received #1)\hss}}

% \hsize of abs affects \pacs def.
% rewritten to allow break over page, if it comes to that.
\def\abstract{%
% following lines added for v2.1
  {\iftwelvepointon\else\textwidth20.5pc\fi\@thanks}\gdef\@thanks{}%
  \numberfootnotes
  \iftwelvepointon\vskip3pc\fi
  \bgroup%
  \vskip1sp%
  \dimen0\textwidth\advance\dimen0by-5.56in\divide\dimen0by2%
  \leftskip\dimen0\rightskip\leftskip%
  \small\vrule width 0pt height .6cm%
  \leavevmode\ignorespaces%
}

\def\endabstract{%
\par\egroup%
\iftwelvepointon\vskip2pc\fi
\vskip4pc\global\everypar={\global\pacsonfalse\global\everypar={}}%
\global\pacsontrue\nointerlineskip
}

\newif\ifdraft
\newif\ifpacson

\def\draft{\global\drafttrue}

% magic 5.56in dimen is related to hardwired width of abstract above
\def\pacs#1{%
 \vtop to0pt{%
      \vskip-4pc\vskip.5\baselineskip\small
      \dimen0\textwidth \advance\dimen0 by-5.56in \divide\dimen0 by2
      \leftskip\dimen0 \rightskip\leftskip \noindent \ifdraft#1\fi
      \par
      \global\everypar={\global\pacsonfalse\global\everypar={}}%
      \global\pacsontrue
      \vss
    }
  \nointerlineskip\vskip1sp%
  \iftwelvepointon%
    {\vfill\hskip -.5in Typeset Using {\em REVTEX}\newpage}%
  \fi%
  \global\pacsontrue%
}

\def\narrowtext{%
\iftwelvepointon\relax\else\vskip1sp\global\hsize=20.5pc
\global\textwidth\hsize\global\linewidth\textwidth\fi}

\def\widetext{%
\iftwelvepointon\relax\else\vskip1sp\global\hsize=42.5pc
\global\textwidth\hsize\global\linewidth\textwidth\fi}

\def\mediumtext{\iftwelvepointon\relax\else%
\vskip1sp\global\hsize=5.5in
\global\textwidth\hsize\global\linewidth\textwidth\fi}

%space after section, 1.4cm
%%32pc

%% math macros

\newcount\letters
\def\alphabetize{\ifcase\letters\or a\or b\or c\or d\or e\or f%
\or g\or h\or i\or j\or k\or l%
\or m\or n\or o\or p\or q\or r%
\or s\or t\or u\or v\or w\or x%
\or y\or z\fi}

\def\sectionalpha{\ifcase\subsecnum\or A\or B\or C\or D\or E\or F%
\or G\or H\or I\or J\or K\or L%
\or M\or N\or O\fi}

% inserted for alpha version of subsub in Appendix labels
\def\subsectionalpha{%
\ifcase\subsubsecnum\or a\or b\or c\or d\or e\or f%
\or g\or h\or i\or j\or k\or l\or m\or n\or o\fi}

\newcount\theappnum
\def\appletter{%
\ifcase\theappnum\or A\or B\or C\or D\or E\or F\or G\or H%
\or I\or J\or K\fi}

\def\usernumber{}% initialize eqnum holder
\def\eqnum#1{%  Dodge to use user-defined label transparently.
  \gdef\@currentlabel{#1}\global\eqnumsettrue\gdef\usernumber{#1}%
}

\let\equnum\eqnum

\def\theequation{%
  \ifappendixon\appletter\fi%
  \ifsecnumbers\ifnum\c@secnum>0 \arabic{secnum}.\fi\fi%
  \arabic{equation}\ifmathletters\alphabetize\fi%
}

\def\case#1/#2{{\textstyle\frac{#1}{#2}}}

\newif\ifapsmmode

\def\mathleftline#1{\hbox to0pt{\hss\hbox to\placemath{\hbox
 to\hsize{$#1$\hfill}\hss}}}

\def\[{%
  \global\apsmmodetrue\relax%
  \ifmmode%
    \@badmath%
  \else%
    \begingroup%
      \let\leftline\mathleftline\trivlist \item[]\leavevmode%
      \hbox to\hsize\bgroup$ % $ TO MAKE 'DOLLAR' NESTING OK
        \displaystyle%
        \iftwelvepointon%
          \hfil%
        \else%
          \ifindented%
            \ifrighteq%
              \global\righteqfalse\hfill%
            \else%
              \hskip\placemath%
            \fi%
          \else%
            \global\indentedtrue%
          \fi%
        \fi%
        \bgroup%
  \fi%
}

\def\]{%
  \relax\global\apsmmodefalse%
  \ifmmode%
    \egroup$\hfil% $ TO MAKE DOLLAR NESTING IN THIS FILE OK%
    \egroup \endtrivlist\endgroup%
  \else%
    \@badmath%
  \fi%
  \noindent\ignorespaces%
}

\newbox\testmathwidth
\newif\iftoowide

\newcount\realeqnum

\def\equation{%
  \ifmathletters%
    \global\advance\letters by1%
  \else%
    \stepcounter{equation}%
  \fi%
  \global\apsmmodetrue\trivlist%
  \item[]\leavevmode%
  \vbox\bgroup%
    \hbox to\hsize\bgroup%
    \setbox\testmathwidth=\hbox\bgroup$%%
    \let\leftline\mathleftline% $ TO MAKE DOLLAR NESTING OK%
    \displaystyle%%
    \iftwelvepointon%
      \hfil%
    \else%%
      \ifindented%
        \ifrighteq%
          \global\righteqfalse\hfill%
        \else%%
          \hskip\placemath%
        \fi%
      \else%
        \global\indentedtrue%
      \fi%
    \fi%%
  \let\@currentlabel=\theequation%
}

\newdimen\currentwidth
\newbox\eqnumwidth

\def\endequation{%
  \global\apsmmodefalse$\egroup%% $ matches one from begin
  \ifeqnumset%  this whole bit thanks to \eqnum
    \global\setbox\eqnumwidth=\hbox{\hskip10pt{\rm(\usernumber)}}%
    \ifmathletters% set back since user num used
      \global\advance\letters by-1%
    \else%
      \global\advance\c@equation by-1%
    \fi%
    \global\eqnumsetfalse
  \else
    \global\setbox\eqnumwidth=\hbox{\hskip10pt\@eqnnum}%%
  \fi
  \currentwidth=\hsize%
  \advance\currentwidth by-\wd\eqnumwidth%%
  \iftwelvepointon % note, center in preprint needs double
    \advance\currentwidth by-\wd\eqnumwidth%%
  \fi
  \ifdim\wd\testmathwidth>\currentwidth\global\toowidetrue\fi%%
% actual stuff going into \hbox\hsize starts here
  \unhbox\testmathwidth\hfil% $ dollar matching
  \displaywidth\hsize%%
  \iftoowide%
    \global\toowidefalse\egroup\vskip6pt
    \hbox to\hsize{\hfill\box\eqnumwidth}%
  \else%
    \iftwelvepointon%
      \llap{\box\eqnumwidth}\egroup%
    \else%
      \box\eqnumwidth\egroup%
    \fi%
  \fi%%
  \egroup\endtrivlist%
  \noindent\global\@ignoretrue%
}

%%%%%%%%% References %%%%%%%%%%%%%%%%%


\def\@cite#1#2{#1\if@tempswa, #2\fi}
\def\@biblabel#1{{\hss$^{\@stripdollars{#1}}$\hskip4pt}}

%=%
\def\@stripdollars#1{%
{% we use latex temps, therefore we group
\edef\@tempd{#1}%
\def\@tempa##1##2+@?{\def\@tempb{##1}\def\@tempc{##2}}%
  \expandafter\@tempa\@tempd+@?% tempb is first tok, tempc rest.
  \if$\@tempb%
    \def\@tempb##1${\def\@tempa{##1}}%
    \expandafter\@tempb\@tempc % now temp b is stripped stuff
    \@tempa%
  \else
    \@tempd%
  \fi
}% end of grouping
}% end of def
%=%

\def\bibitem{\@ifnextchar[{\@lbibitem}{\@bibitem}}

\def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
       {\string\bibcite{#1}{\the\c@enumi}}\fi}

\let\citation\@gobble

\def\@lbibitem[#1]#2{\item[\@biblabel{#1}]\if@filesw
{\def\protect##1{\string ##1\space}%
\immediate\write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}

\def\bibcite#1#2{\global\@namedef{b@#1}{#2}\@SetMaxRefLabel{#1}}

\newdimen\WidestRefLabelThusFar
\global\WidestRefLabelThusFar=\z@
% default, overridden by aux file setting if any

\def\@SetMaxRefLabel#1{%
 {% scope to protect box0
  \if\@ExpandsToRefNumber{#1}%
    \setboxz@h{\iftwelvepointon\@normalsize\else\small\fi
        \rm[\csname b@#1\endcsname]}%
  \else
    \setboxz@h{\iftwelvepointon\@normalsize\else\small\fi
        $\scriptstyle\m@th\@stripdollars{\csname b@#1\endcsname}$}%
  \fi
  \ifdim\wd0>\WidestRefLabelThusFar
    \global\WidestRefLabelThusFar=\wd0
  \fi
 }%
}

\def\onlinecite{%
\@ifnextchar[{\@tempswatrue\@CITEX}{\@tempswafalse\@CITEX[]}}

\let\cite\onlinecite \let\citenum\onlinecite

\def\@bylinecite{%
\@ifnextchar[{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}%
}

\def\@ExpandsToRefNumber #1{%
      TT\fi    %  inna v.B. styley
      \@ifundefined{b@#1}%
      {\@tempcntb=1
      }% leave undefined's sups. later sym in list may need math
      {\edef\@tempb{\csname b@#1\endcsname}%
       \def\@tempa{\@temptokena=\bgroup}%
       \if0A { \else  \fi % curly to match the one two lines down.
       \afterassignment\@tempa
       \@tempcntb=0\@tempb}%    % curly matches one two lines up.
      }%
       \ifnum\@tempcntb>0\relax
}%

\def\@CITEX[#1]#2{%
  \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  [\@cite{\@collapse{#2}}{#1}]%
}%

\def\@citex[#1]#2{%
\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
\leavevmode\unskip\nobreak$^{\scriptstyle\@cite{\@collapse{#2}}{#1}}$}

\def\@collapse#1{%
{% grouping to allow use of latex temps
\sfcode`,=2000\relax
\dimen0=\the\fontdimen2\textfont0\relax
\xspaceskip = .6\dimen0 plus.3\dimen0 minus.3\dimen0\relax
\let\@temp\relax
\@tempcntb\@MM
\def\@citea{}%
\@for \@citeb:=#1\do{%
  \@ifundefined{b@\@citeb}%
    {\@temp\@citea{\bf ?}%
     \@tempcntb\@MM\def\@citea{,}\let\@temp\relax%
     \@warning{Citation `\@citeb ' on page \thepage\space undefined}%
    }% end of \@ifundefined #1 arg
    {\@tempcnta\@tempcntb \advance\@tempcnta\@ne
     \edef\MyTemp{\csname b@\@citeb\endcsname}%
     \def\@tempa{\@temptokena=\bgroup}% toss rest (non#) of footmark
     \if0A{\fi% hack to match brackets in \@collapse def
     \afterassignment\@tempa % non# part of cite goes into temp toks
        % NEXT LINE: curly opens in \@tempa, 0 default if non#
     \@tempcntb=0\MyTemp\relax}%
     \ifnum\@tempcntb=0\relax% non-# cite mark
       \@tempcntb=\@MM
       \@citea\@stripdollars{\MyTemp}%
       \let\@temp = \relax
       \def\@citea{,}%
     \else % treating cite mark as #
       \edef\@tempd{\number\@tempcntb}%
       \ifnum\@tempcnta=\@tempcntb%
          \ifx\@temp\relax
             \edef\@temp{\@citea\@tempd}%
          \else%
             \edef\@temp{\hbox{--}\@tempd}%
          \fi%
       \else%
         \@temp\@citea\@tempd
         \let\@temp\relax
       \fi
     \def\@citea{, }%
     \fi%
    }% end of @ifundefined #2 arg
}% end of do loop
\@temp % drop in last bit saved
}% end of grouping to allow use of latex temps
}% end of \@collapse def

\let\bibdata=\@gobble
\let\bibstyle=\@gobble

% same as LaTeX
\def\bibliography#1{%
\if@filesw\immediate\write\@auxout{\string\bibdata{#1}}\fi
\@input{\jobname.bbl}}

% same as LaTeX
\def\bibliographystyle#1{\if@filesw\immediate\write\@auxout
    {\string\bibstyle{#1}}\fi}

\def\references{%
  \bgroup\narrowtext\linewidth=\textwidth\vskip24pt%%
  \iftwelvepointon%
    \newpage{\centerline{REFERENCES}}%
  \else
    \hrule width\textwidth%
  \fi%
  \vskip1.6cm%
  \ifdim\baselinestretch in>1 in\parsep4pt\else\parsep 0pt\fi%
  \ifdim\baselinestretch in>1 in\itemsep4pt\else\itemsep 0pt\fi%
  \list%
  {{[\arabic{enumi}]\hskip4pt}}%
%4pt is space from label to start of ref.
%the magic 4pt value is also used in \@biblabel
  {\settowidth%
     \labelwidth{\hbox spread4pt{\hskip\WidestRefLabelThusFar\hfil}}%
    \leftmargin\labelwidth%
    \labelsep=0pt%
    \advance\leftmargin\labelsep%
    \usecounter{enumi}}%
  \def\newblock{\hskip .11em plus .33em minus -.07em}%
  \sloppy%
  \sfcode`\.=1000\relax\iftwelvepointon\else\small\fi%
}

\def\endreferences{%
  \endlist\vskip1sp\egroup
  \gdef\@SetMaxRefLabel##1{}%
}

%%%%% these end foot note macros seem to be outdated (????, AH)
%% if so, they should be deleted up to the %%*****

\newif\ifendfootnotes

\newinsert\endft
\count\endft=0
\dimen\endft=8in
\skip\endft=0pt

%%\footnotenum can be set to 0 with each new chapter if desired.

\newcount\footnotenum
\def\footnote#1{\global\advance\footnotenum by1$^{\the\footnotenum}$%
\insert\endft{{\everypar={}\leftskip=0pt\parskip=0pt\parindent=-.3cm
\leftskip=.3cm
\vskip3pt{$^{\the\footnotenum}$}\small#1\vskip1sp}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcounter{figure}[chapter]
\def\thefigure{\@arabic\c@figure}
\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{FIG.\ \thefigure}
\def\figure#1{%
\ifpreprinsty\iffirstfig
  {\newpage\centerline{FIGURES}}\firstfigfalse
\fi\fi
{\def\@currentlabel{\thefigure}
\global\advance\c@figure by1
\vskip33pt\small
 \fnum@figure.\hskip1em#1\vskip3pt}}

\newcounter{table}[chapter]
\def\thetable{\@Roman\c@table}
\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{TABLE \thetable.}

\def\resettablenotes{%
\gdef\asavetablenotes{}%
\gdef\bsavetablenotes{}%
\gdef\csavetablenotes{}%
\gdef\dsavetablenotes{}%
\gdef\esavetablenotes{}%
\gdef\fsavetablenotes{}%
\gdef\gsavetablenotes{}%
\gdef\hsavetablenotes{}%
\gdef\isavetablenotes{}%
\gdef\jsavetablenotes{}%
\gdef\ksavetablenotes{}%
\gdef\lsavetablenotes{}%
\gdef\msavetablenotes{}%
\gdef\nsavetablenotes{}%
\gdef\osavetablenotes{}%
\gdef\psavetablenotes{}%
\gdef\qsavetablenotes{}%
\gdef\rsavetablenotes{}%
\gdef\ssavetablenotes{}%
\gdef\tsavetablenotes{}%
\gdef\usavetablenotes{}%
\gdef\vsavetablenotes{}%
\gdef\wsavetablenotes{}%
\gdef\xsavetablenotes{}%
\gdef\ysavetablenotes{}%
\gdef\zsavetablenotes{}%
}

\resettablenotes

\newcount\tnum
\def\tcase{\ifcase\tnum a\or b\or c\or d\or e\or f\or%
g\or h\or i\or j\or k\or l\or m\or n\or o\or p\or q\or r\or%
s\or t\or u\or v\or w\or x\or y\or z\fi}

\long\def\tablenotes#1{\advance\tnum by1%
\expandafter\gdef\csname\tcase savetablenotes\endcsname%
{{\vskip0.28pt \small#1}}}

\long\def\@makecaption#1#2{\vskip 23pt\ifoutertab
\gdef\savecaption{\small#1\hskip1em\rm#2}\else
\small#1\hskip1em\rm#2\fi}

\def\tableline{\noalign{\vskip2pt\hrule\vskip2pt}}

%%%%% \dec stuff
\newdimen\@Ldec \newdimen\@Rdec

\def\dec #1.#2 {\hbox to\@Ldec{\hss#1}\def\test{#2}%
\ifx\test\empty\hbox to\@Rdec{\hfill}\else\hbox to\@Rdec{.#2\hss}\fi
}

\def\setdec #1.#2 {\relax%
  \bgroup
    \setbox0\hbox{\kern1pt\relax#1}\setbox1\hbox{\kern1pt\relax#2}%
    \global\@Ldec\wd0\global\@Rdec\wd1%
  \egroup
}

\setdec 000.000 % default size of 3 digits on each size

%%%%% \table stuff

\def\savecaption{}

\def\savetablenotes{}

\long\def\@caption#1[#2]#3{\begingroup
    \@parboxrestore
    \small
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
  \endgroup}

\def\apstable@array[#1]#2{\setbox\@arstrutbox=\hbox{\vrule
     height\arraystretch \ht\strutbox
     depth\arraystretch \dp\strutbox
     width\z@}\@mkpream{#2}\edef\@preamble{\halign
 to\textwidth%\noexpand\@halignto
\bgroup \tabskip\z@ plus1fil \@arstrut
\@preamble\hskip-\tabcolsep \tabskip\z@
 \cr}%
\let\@startpbox\@@startpbox \let\@endpbox\@@endpbox%
%  following killed, not necess 4 here, to allow p. breaks
%  \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi%
  \bgroup\let\par\relax\outertabfalse%
  \let\@sharp##\let\protect\relax
  \lineskip\z@\baselineskip\z@\@preamble}

\def\@array[#1]#2{\setbox\@arstrutbox=\hbox{\vrule
     height\arraystretch \ht\strutbox
     depth\arraystretch \dp\strutbox
     width\z@}\@mkpream{#2}\edef\@preamble{\halign\noexpand\@halignto
\bgroup\tabskip\z@\@arstrut\@preamble
\tabskip\z@\cr}%
\let\@startpbox\@@startpbox \let\@endpbox\@@endpbox%
  \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi%
  \bgroup\let\par\relax%
  \let\@sharp##\let\protect\relax
  \lineskip\z@\baselineskip\z@\@preamble}


\def\@tabclassz{\ifcase \@lastchclass\@acolampacol%
\or \@ampacol \or \or \or \@addamp \or \@acolampacol\or%
\@firstampfalse \new@tabacol \fi%
\edef\@preamble{\@preamble%
  \ifcase \@chnum%
     \hfil\ignorespaces\@sharp\unskip\hfil%
     \or \ignorespaces\@sharp\unskip\hfil%
     \or \hfil\hskip\z@ \ignorespaces\@sharp\unskip\fi}}

\def\@tabclassiv{\@addtopreamble\@nextchar}

\def\tabular{\def\@halignto{}\ifoutertab%
\global\setbox\ahtablebox=\vbox\bgroup%
\fi\small\@tabular}

\newif\ifoutertab
\global\outertabfalse

\def\@tabular{%
\ifoutertab
  \bgroup
\else
  \leavevmode\hbox\bgroup$%
\fi
\let\@acol\@tabacol
\let\@classz\@tabclassz
\let\@classiv\@tabclassiv \let\\\@tabularcr
\ifoutertab\let\MyTemp\apstable@tabarray\else\let\MyTemp\@tabarray\fi
\MyTemp
}

\def\apstable@tabarray{%
\@ifnextchar[{\apstable@array}{\apstable@array[c]}%
}

\def\endtabular{%
\crcr\egroup\egroup%
\ifoutertab\egroup\else$\fi\egroup%
}

\def\new@tabacol{\edef\@preamble{\@preamble \hskip0pt% \tabcolsep
}}

\newif\iftableon
\newbox\ahtablebox

\def\@mkpream#1{\@firstamptrue\@lastchclass6
\def\@preamble{}%
\def\protect{\noexpand\protect\noexpand}\let\@sharp\relax
\let\@startpbox\relax\let\@endpbox\relax
\@expast{#1}\expandafter\@tfor \expandafter
  \@nextchar \expandafter:\expandafter=\@tempa\do{\@testpach\@nextchar
  \ifcase \@chclass \@classz \or \@classi \or \@classii \or \@classiii
    \or \@classiv \or\@classv \fi%
% following if construct to re-enable LaTeX @, but keep our "expand".
\iftableon
  \ifnum\@chclass=4
    \@addtopreamble{\tabskip\z@}%
  \else
    \ifnum\@lastchclass=4
      \@addtopreamble{\tabskip\z@ plus1fil}%
    \fi
  \fi
\fi
% EOF (end of fix)
\@lastchclass\@chclass}%
\ifcase \@lastchclass \@acol
    \or \or \@preamerr \@ne\or \@preamerr \tw@\or \or \@acol \fi}

\def\table{\ifpreprinsty\iftblone{\newpage\centerline{TABLES}}\fi\fi
\global\tableontrue\bgroup\parindent=0pt\outertabtrue
\def\@captype{table}}

\def\endtable{{%
\setbox0=\hbox{\savecaption}%
\ifx\savecaption\empty%
\else%
    \ifdim\wd0<\wd\ahtablebox%
      \hbox to\wd\ahtablebox{\hfill\savecaption\hfill}%
    \else%
      \hskip1em\savecaption%
    \fi%
\fi%
\ifvoid\ahtablebox\else
\vskip.2cm
\hrule width\textwidth
\vskip2pt
\hrule width\textwidth
\vskip2pt
\unvbox\ahtablebox%
\vskip2pt
\hrule width\textwidth
\vskip2pt
\hrule width\textwidth\fi
\vskip6pt
\asavetablenotes
\bsavetablenotes
\csavetablenotes
\dsavetablenotes
\esavetablenotes
\fsavetablenotes
\gsavetablenotes
\hsavetablenotes
\isavetablenotes
\jsavetablenotes
\ksavetablenotes
\lsavetablenotes
\msavetablenotes
\nsavetablenotes
\osavetablenotes
\psavetablenotes
\qsavetablenotes
\rsavetablenotes
\ssavetablenotes
\tsavetablenotes
\usavetablenotes
\vsavetablenotes
\wsavetablenotes
\xsavetablenotes
\ysavetablenotes
\zsavetablenotes
}\egroup%
\global\tableonfalse\gdef\savecaption{}%
\resettablenotes
\global\tblonefalse
\global\setbox\ahtablebox=\vbox{}\filbreak}

\def\quasitable{%
  \par\vskip\topsep \bgroup
  \def\caption##1{\typeout{REVTEX Warning: Captions are not supported
  for quasitables.}\typeout{\space\space No caption was set.}}%
  \def\tablenotes##1{\typeout{REVTEX Warning: Tablenotes are not
  supported for quasitables.}%
  \typeout{\space\space No tablenotes were set.}}%
  \tableontrue\outertabtrue\parindent0pt\relax}

\def\endquasitable{\par\box\ahtablebox\egroup\vskip\topsep\noindent
\global\@ignoretrue}

\def\overlay#1#2{\ifmmode%
\setbox0=\hbox{$#1$}%
\setbox1=\hbox to\wd0{\hss$#2$\hss}\else%
\setbox0=\hbox{#1}%
\setbox1=\hbox to\wd0{\hss#2\hss}\fi%
 #1\hskip-\wd0\box1 }

%%%%%%%%%%%%%%%%%

\def\pmb#1{\leavevmode\setbox0=\hbox{#1}%
\kern-.02em\copy0\kern-\wd0
\kern.04em\copy0\kern-\wd0
\kern-.02em\raise.04em\box0 }

\def\Bigglb#1{\leavevmode\hbox{\pmb{$\Biggl#1$}}}
\def\Biglb#1{\leavevmode\hbox{\pmb{$\Bigl#1$}}}
\def\bigglb#1{\leavevmode\hbox{\pmb{$\biggl#1$}}}
\def\biglb#1{\leavevmode\hbox{\pmb{$\bigl#1$}}}
\def\Biggrb#1{\leavevmode\hbox{\pmb{$\Biggr#1$}}}
\def\Bigrb#1{\leavevmode\hbox{\pmb{$\Bigr#1$}}}
\def\biggrb#1{\leavevmode\hbox{\pmb{$\biggr#1$}}}
\def\bigrb#1{\leavevmode\hbox{\pmb{$\bigr#1$}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\alt{\mathrel{\mathpalette\vereq<}}
\def\vereq#1#2{\lower3pt\vbox{\baselineskip1.5pt \lineskip1.5pt
\ialign{$\m@th#1\hfill##\hfil$\crcr#2\crcr\sim\crcr}}}

\def\agt{\mathrel{\mathpalette\vereq>}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% just in case.
\def\eqnumback {\addtocounter{equation}{-1}}
\def\eqnumfwd  {\addtocounter{equation}{1}}
\def\eqlettback{\global\advance\letters by-1}
\def\eqlettfwd {\global\advance\letters by1}

%%%%%%%%%%%%%%%%%%% bibtex

\global\let\newblock\relax
\gdef\thebibliography#1{\references}
\gdef\endthebibliography{\endreferences}

\sloppy

%%%%%%%
%%%%%%%
% after here is all v2.1 stuff
%%%%%%%
%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% following def customized for aps style
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\@fnsymbol#1{\ifcase#1\or *\or \dagger\or \ddagger\or
   \mathchar "278\or **\or \dagger\dagger
   \or \ddagger\ddagger \or \mathchar "278 \mathchar "278\or
   ***\or\dagger\dagger\dagger\or\ddagger\ddagger\ddagger\or
   \mathchar "278 \mathchar "278 \mathchar "278
   \else\@ctrerr\fi\relax}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% new, math mode, scalable in subs, section and paragraph symbols
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\Sinmath{\mathchar"278\relax}
\def\Pinmath{\mathchar"27B\relax}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%  now for footnote stuff
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\iftwelvepointon
\footnotesep 2pc
\skip\footins 25.25pt plus 4pt minus 2pt
\def\footnoterule{\kern-5.25pt\hrule width.5in\kern4.85pt}
\else
% 9.25 here plus 1.75 later => 11pt (\small leading for galley)
\footnotesep 9.25pt
\skip\footins 39pt plus 4pt minus 2pt
\def\footnoterule{\kern-19pt\hrule width.5in\kern18.6pt}
\fi


\long\def\@makefntext#1{\parindent 5pt\hsize\textwidth\parskip0pt\relax
 \small\def\strut{\vrule width0pt height0pt depth1.75pt\relax}%
 $^{\@thefnmark}$#1}

%%%%%%% from latex.tex, this def is accidently clobbered in revtex.sty
\def\footnote{\@ifnextchar[{\@xfootnote}{\stepcounter
{\@mpfn}\xdef\@thefnmark{\thempfn}\@footnotemark\@footnotetext}}

% new options to switch footnotemarks
\def\numberfootnotes{\setcounter{footnote}{0}%
                       \gdef\thefootnote{\arabic{footnote}}}
\def\letterfootnotes{\setcounter{footnote}{0}%
                       \gdef\thefootnote{{(\rm\alph{footnote})}}}
\def\symbolfootnotes{\setcounter{footnote}{0}%
                       \gdef\thefootnote{\fnsymbol{footnote}}}

% now the defaults for start of paper
\gdef\@thanks{}\symbolfootnotes

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newbox\@savecaptionboxarrrgh

\long\def\@makecaption#1#2{\vskip 23pt\ifoutertab
\global\setbox\@savecaptionboxarrrgh=\hbox{\small#1\hskip1em\rm#2}\else
\small#1\hskip1em\rm#2\fi}



\def\endtable{{%
\ifdim\wd\@savecaptionboxarrrgh<\wd\ahtablebox%
  \hbox to\wd\ahtablebox{\hfil\unhbox\@savecaptionboxarrrgh\hfil}%
\else%
  {\small\hskip1em\unhbox\@savecaptionboxarrrgh\par}
\fi%
\ifvoid\ahtablebox\else
\vskip.2cm
\hrule width\textwidth
\vskip2pt
\hrule width\textwidth
\vskip2pt
\unvbox\ahtablebox%
\vskip2pt
\hrule width\textwidth
\vskip2pt
\hrule width\textwidth\fi
\vskip6pt
\asavetablenotes
\bsavetablenotes
\csavetablenotes
\dsavetablenotes
\esavetablenotes
\fsavetablenotes
\gsavetablenotes
\hsavetablenotes
\isavetablenotes
\jsavetablenotes
\ksavetablenotes
\lsavetablenotes
\msavetablenotes
\nsavetablenotes
\osavetablenotes
\psavetablenotes
\qsavetablenotes
\rsavetablenotes
\ssavetablenotes
\tsavetablenotes
\usavetablenotes
\vsavetablenotes
\wsavetablenotes
\xsavetablenotes
\ysavetablenotes
\zsavetablenotes
}\egroup%
\global\tableonfalse
\resettablenotes
\global\tblonefalse
\global\setbox\ahtablebox=\vbox{}%
\par\vskip0pt plus 1filll\penalty-200\vskip0pt plus -1filll\relax}


% end of file revtex.sty

