\message{: version 12nov09}%{20sep06}

% This is the file satmacros.tex, for use with Surveys in Approximation Theory.
% It contains the definition of the various macros that appear in the
% template file  textemplate.tex , along with macros that support them.
% In addition, it contains macros you might find useful (along with their
% supporting macros).
%
% If you choose to change anything in this file, be sure to give it a
% different name first.

% The file is organized in sections.
% Each section with a title in CAPITALS begins with the macros you would
% actually be using (in additions to those that appear in the template file
% textemplate.tex), followed by supporting macros.
% The other sections only contain macros mentioned in textemplate.tex and
% supporting macros.

%        TABLE of CONTENTS

%    FONTS
%       OPEN FACE LETTERS
%       BOLDFACE
%    USEFUL MACROS
%    SOME MATH MACROS
%    PROOF and END OF PROOF
%    page size
%    first page
%       footnote on first page
%    sections
%    FIGURE MACROS
%    PRECISE PLACEMENT
%    TABLE MACROS
%    AUTOMATIC SEQUENCING
%       set up counters
%       set up numbering
%    draft
%    acknowledgements
%    REFERENCES
%       SAT style
%       needed tokens
%       supporting macros
%       basic bib macros

%********************** FONTS *******************************

\font\titlefont=cmr17
\font\titlei=cmmi10 at 17pt
\font\titlesy=cmsy10 at 17pt
\font\titleit=cmti10 at 17pt
\font\titlesl=cmsl10 at 17pt
\font\titlebf=cmbx10 at 17pt
\font\Bbbt=msbm10 at 17pt
\font\twelverm=cmr12
\font\twelvebf=cmbx10 at 12pt
\font\twelvei=cmmi10 at 12pt
\font\twelvesy=cmsy10 at 12pt
\font\ninerm=cmr9
\font\sevenrm=cmr7
\font\sixrm=cmr6
\font\fiverm=cmr5
\font\ninei=cmmi9
\font\seveni=cmmi7
\font\ninesy=cmsy9
\font\sevensy=cmsy9
\font\tenbf=cmbx10
\font\sixbf=cmbx6
\font\fivebf=cmbx5
\font\ninebf=cmbx9
\font\nineit=cmti9
\font\ninesl=cmsl9
\font\nineex=cmex9
\font\nineBbb=msbm9
\font\cmsc=cmcsc10
\font\dfont=cmss10
\font\dfont=cmbx10
\font\efont=cmti10
\font\Bbb=msbm10
\font\Bbbs=msbm7

\def\ninepoint{\def\rm{\fam0\ninerm}
    \textfont0 = \ninerm
    \textfont1 = \ninei
    \textfont2 = \ninesy
    \textfont3 = \nineex
    \scriptfont0 = \sevenrm
    \scriptfont1 = \seveni
    \scriptfont2 = \sevensy
    \scriptscriptfont0 = \fiverm
    \scriptscriptfont1 = \fivei
    \scriptscriptfont2 = \fivesy
    \textfont\itfam=\nineit \def\it{\fam\itfam\nineit}
    \textfont\bffam=\ninebf \scriptfont\bffam=\sixbf
    \scriptscriptfont\bffam=\fivebf \def\bf{\fam\bffam\ninebf}
    \textfont\slfam=\ninesl \def\sl{\fam\slfam\ninesl}
    \let\Bbb\nineBbb
    \baselineskip 10pt}

\def\titlepoint{\def\rm{\fam0\titlefont}
    \textfont0 = \titlefont
    \textfont1 = \titlei
    \textfont2 = \titlesy
    \textfont3 = \nineex
    \scriptfont0 = \twelverm
    \scriptfont1 = \twelvei
    \scriptfont2 = \twelvesy
    \textfont\itfam=\titleit \def\it{\fam\itfam\titleit}
    \textfont\bffam=\titlebf \scriptfont\bffam=\twelvebf
    \def\bf{\fam\bffam\titlebf}
    \textfont\slfam=\titlesl \def\sl{\fam\slfam\titlesl}
    \let\Bbb\Bbbt\titlefont}

   %******************* OPEN FACE LETTERS ****************

\def\Cbb{\hbox{{\Bbb{C}}}}
\def\Dbb{\hbox{{\Bbb{D}}}}
\def\Kbb{\hbox{{\Bbb{K}}}}
\def\Nbb{\hbox{{\Bbb{N}}}}
\def\Pbb{\hbox{{\Bbb{P}}}}
\def\Qbb{\hbox{{\Bbb{Q}}}}
\def\Rbb{\hbox{{\Bbb{R}}}}
\def\Tbb{\hbox{{\Bbb{T}}}}
\def\Zbb{\hbox{{\Bbb{Z}}}}

\let\CC\Cbb
\def\CCt{\hbox{\Bbbt C}}  % for use in title
\def\CCs{\hbox{\Bbbs C}}  % for use in sub/superscripts
\let\NN\Nbb
\let\PP\Pbb
\let\RR\Rbb
\def\RRt{\hbox{\Bbbt R}}  % for use in title
\def\RRs{\hbox{\Bbbs R}}  % for use in sub/superscripts
\let\TT\Tbb
\let\ZZ\Zbb
   %******************* BOLDFACE *************************

% Boldface math
\def\bfm#1{{\dimen0=.01em\dimen1=.009em\makebold{$#1$}}}

% Boldface subscript
\def\bfs#1{{\dimen0=.008em\dimen1=.0073em
  \makebold{$\scriptstyle#1$}}}

% Boldface subsubscript
\def\bfss#1{{\dimen0=.006em\dimen1=.0057em
   \makebold{$\scriptscriptstyle#1$}}}

\def\makebold#1{\mathord{\setbox0=\hbox{#1}%
       \copy0\kern-\wd0%
       \raise\dimen1\copy0\kern-\wd0%
       {\advance\dimen1 by \dimen1\raise\dimen1\copy0}\kern-\wd0%
       \kern\dimen0\raise\dimen1\copy0\kern-\wd0%
       {\advance\dimen1 by \dimen1\raise\dimen1\copy0}\kern-\wd0%
       \kern\dimen0\raise\dimen1\copy0\kern-\wd0%
       {\advance\dimen1 by \dimen1\raise\dimen1\copy0}\kern-\wd0%
       \kern\dimen0\raise\dimen1\copy0\kern-\wd0%
       \kern\dimen0\box0}}

%********************** USEFUL MACROS ***********************

\def\bull{\item{$\bullet$}}
\def\nobull{\item{}}

\def\cro{\cr \noalign{\vskip 4pt}}
  %%  Use in place of \cr for extra space between cases

\def\croo{\cr \noalign{\vskip 6pt}}
  %%  Use in place of \cr for extra space between cases

\def \dword#1{{\dfont #1}}

\def \eword#1{{\efont #1}}

\def\eg{{\it e.g.}}%

\def\ie{{\it i.e.}}

\def \lrm {{\rm (}}
\def \rrm {{\rm )}}

\def\ritem#1{\smallskip\item{\rm #1}}

\def\ritemitem#1{\smallskip\itemitem{\rm #1}}

\def\thc{{$\thinspace$:}}


%********************** SOME MATH MACROS ********************

\def\inpro#1{\langle#1\rangle}
\def\norm#1{\Vert#1\Vert}
\def\floor#1{\lfloor#1\rfloor}
\def\ceil#1{\lceil#1\rceil}

\def\dd{\,{\rm d}} % for integration
\def\ee{{\rm e}}   % for the base of the natural log
\def\ii{{\rm i}}   % for the imaginary unit
                  %% (making them mathop places them less well)

\def\frac#1#2{{#1 \over #2}}
   % #1 = numerator
   % #2 = denominator

\def\fracc#1#2{\ninepoint{#1 \over #2}}
   % #1 = numerator
   % #2 = denominator

\def\st{\/:\ }
 %%  Use \st for "such that" in definitions of sets

%********************** PROOF and END OF PROOF **************

\def\endproofsymbol{\makeblanksquare6{.4}}
\def\eop{\endproofsymbol\nopf}
%\def\eop{\hbox{}~\hfill\endproofsymbol\nopf}
  %% Mark the end of a proof

\def\meop{~~\endproofsymbol}
 %%  Use this inside of displayed equations instead of \eop

\def\nopf{\medskip\goodbreak}
  %% If there is no proof, use this to insert space

\def\pf{\noindent{\bf Proof: }}

\def\makeblanksquare#1#2{
\dimen0=#1pt\advance\dimen0 by -#2pt
      \vrule height#1pt width#2pt depth0pt\kern-#2pt
      \vrule height#1pt width#1pt depth-\dimen0 \kern-#1pt
      \vrule height#2pt width#1pt depth0pt \kern-#2pt
      \vrule height#1pt width#2pt depth0pt
}

%********************** page size ***************************
%\magnification\magstep0
\magnification\magstephalf

%\hsize12.1truecm\vsize18.6truecm
%\hoffset.8truein
\hsize6.5truein\vsize8.6truein
\voffset.5truein

%********************** first page  *************************

\def\title#1{\toneormore#1||||:}
   %% If overlong, use || to indicate linebreaks
\def\titexp#1#2{\hbox{{\titlefont #1} \kern-.25em%
  \raise .90ex \hbox{\twelverm #2}}\/}
  %% Use to create superscripts in the title
\def\titsub#1#2{\hbox{{\titlefont #1} \kern-.25em%
  \lower .60ex \hbox{\twelverm #2}}\/}
  %% Use to create subscripts in the title

\def\author#1{\bigskip\bigskip\aoneormore#1||||:\smallskip\centerline{\updated}}
   %% If overlong, use || to indicate linebreaks

% \let\ninepoint\empty
\def\abstract#1{\bigskip\bigskip\medskip%
 {\ninepoint
 \narrower{\bf Abstract.~}\rm#1\smallskip
  MSC: \mscnumbers\ifx\keywords\empty\else\smallskip
  Keywords: \keywords\fi\bigskip
 \printtochere}\starttoc\bigskip}

\def\toneormore#1||#2||#3:{\centerline{\titlepoint #1}%
    \def\next{#2}\ifx\next\empty\else\medskip\toneormore#2||#3:\fi}
\def\aoneormore#1||#2||#3:{\centerline{\twelverm #1}%
    \def\next{#2}\ifx\next\empty\else\smallskip\aoneormore#2||#3:\fi}

\newwrite\toc\def\tocone{0}\def\tochalf{.5}\def\toctwo{1}
\countdef\counter=255
% the next macro is from the \TeX-book
\def\diamondleaders{\global\advance\counter by 1
  \ifodd\counter \kern-10pt \fi
  \leaders\hbox to 15pt{\ifodd\counter \kern13pt \else\kern3pt \fi
    .\hss}}
\newdimen\lextent
\def\printtochere{\immediate\closeout\toc\relax%
\begingroup
\def\\##1.  ##2.  {\setbox1=\hbox{##1}\ifnum\wd1>\lextent\lextent\wd1\fi}
\lextent0pt\inputifthere{\jobname.toc}\advance\lextent by 2em\relax
\def\\##1.  ##2.  {\centerline{\hbox to \lextent{\rm##1\def\next{##2}%
\iffoliointoc
\ifx\next\empty\else\diamondleaders\fi\hfil\hbox to 2em{\hss##2}\fi}}}
\inputifthere{\jobname.toc}\endgroup}

\def\starttoc{\immediate\openout\toc=\jobname.toc}
\def\nexttoc#1{{\let\folio=0\edef\next{\write\toc{#1}}\next}}

\def\tocline#1#2#3{\nexttoc{\noexpand\noexpand\noexpand\\\hskip#2truecm #1.  #3.  }}

\def\footnoterule{\kern -3pt \hrule width 0truein \kern 2.6pt}
\def\leftheadline{\ifnum\pageno=\count100 \hfill%
  \else\hfil\it\shortauthor\hfil\llap{\rm\folio}\fi}
\def\rightheadline{\ifnum\pageno=\count100 \hfill%
  \else\hfil\it\shorttitle\hfil\llap{\rm\folio}\fi}

\nopagenumbers
\headline{\ifodd\pageno\rightheadline \else\leftheadline\fi}
\footline{\hfil}
\null\vskip 18pt
\centerline{}
\pageno=\count100
\count102=\count100
\advance\count102 by -1
\advance\count102 by \count101

   %******************* footnote on first page  **********

\def\copyright{\hbox{{\twelverm o}\kern-.61em\raise .46ex\hbox{\fiverm c}}}
%% plain TeX's \copyright does not adjust nicely to smaller fonts

\insert\footins{\sixrm
\medskip
\baselineskip 8pt
\leftline{Surveys in Approximation Theory
  \hfill {\ninerm \the\pageno}}
\leftline{Volume \vol, \yr,
pp.~\the\pageno--\the\count102.}
\leftline{Copyright \copyright\ \yr\ Surveys in Approximation Theory.}
\leftline{ISSN 1555-578X}
\leftline{All rights of reproduction in any form reserved.}
\smallskip
\par\allowbreak}

%********************** sections ***************************


\def\sect#1{\startsect\edef\showsectno{\the\sectionno}%
   \let\tocindent\tocone\soneormore#1||||:\relax\medskip\noindent\ignorespaces}
  %% DEFINE SECTION HEADING
  %% if overlong, use || to introduce line breaks
\def\sectwopn#1{\foliointocfalse\sect{#1}\foliointoctrue}

\def\soneormore#1||#2||#3:{%
   \formsecthead{#1}
   \def\next{#2}\def\pfolio{\folio}\iffoliointoc\else\def\pfolio{}\fi%
   \ifx\next\empty\puttocline{\showsectno\ \ #1}{\pfolio}%
   \else\puttocline{\showsectno\ \ #1}{}\let\showsectno\skipsectno\let\tocindent\tochalf\soneormore#2||#3:\fi}

\def\formsecthead#1{\leftline{\bf\showsectno\hskip2em #1}}

\newif\iffoliointoc\foliointoctrue
\def\puttocline#1#2{\tocline{#1}{\tocindent}{#2}}
\def\skipsectno{\setbox0=\hbox{\the\sectionno}\hskip\wd0}

\def\subsect#1{\formsubsecthead{#1}\let\tocindent\toctwo\puttocline{#1}{\folio}}

\def\formsubsecthead#1{\bigskip{\bf #1}\hskip1em}

\def\fsubsect#1{\vskip-\baselineskip\subsect{#1}}

\newcount\sectionno\sectionno0
\def\presect{\the\sectionno.}
\newcount\subsectionno
\def\startsect{\ifx\empty\presect\else\restartnums\fi%
               \subsectionno0\global\advance\sectionno by 1\relax

               \goodbreak\bigskip\smallskip}
\def\startsubsect{\global\advance\subsectionno by 1\goodbreak\bigskip}

\def\formal#1{\bigskip{\bf #1}\hskip1em}
%********************** FIGURE MACROS ***********************

\def\placefig#1#2{\smallskip\centerline{\epsfxsize=#2 truecm
\epsfbox{\figsource #1}}\smallskip}

\def\figcaption#1{\smallskip{\foneormore#1||||:}\bigskip}

\def\figinbox#1(#2,#3)#4#5{\centerline{\vbox{\gridbox#2/#3/{
\ifshowfigname\point(0,0){#1}\fi
  \point(0,0){\epsfxsize=#4truecm \epsfbox{\figsource #1}}#5}}}}
   %% #1 = postscript file name
   %% #2 = depth of grid box (in truecm) (need not be an integer)
   %% #3 = width of grid box (in truecm) (need not be an integer)
   %% #4 = width (in truecm) to which the figure is to be scaled
   %% #5 = labels to be placed onto the figure; see explanation for #3
          % of \gridbox in next section
   %% Turn off the grid by putting the command \showgridfalse anywhere before
   %% the \figinbox command.

\input epsf
\def\figsource{}
\newif\ifshowfigname

\def\foneormore#1||#2||#3:{\centerline{\ninepoint\rm #1}%
    \def\next{#2}\ifx\next\empty\else\vskip0pt\foneormore#2||#3:\fi}

%********************** PRECISE PLACEMENT *******************

\def\gridbox#1/#2/#3{
\vbox to #1\gridunits{#3
\ifshowgrid\tickcount=0
  \loop\cgridw%
   \vbox to 0pt{\kern\tickcount \gridunits\hrule width#2\gridunits
       height\gridwidth\vss}
   \nointerlineskip \advance\tickcount by \tickskip
   \ifdim\tickcount pt<#1pt\repeat % Note: #1, #2 need not be integers
  \hbox to 0pt{\tickcount=0\hbox to 0pt{\tick#1/\hss}\advance\tickcount by \tickskip%
 \loop\ifdim\tickcount pt<#2pt\nexttick\tickskip#1/\advance\tickcount by \tickskip \repeat\hss}
\else \vbox to 0pt{\hrule width#2\gridunits height0pt\vss}
\fi\vfil}\vfil}
   %% #1 = depth of grid (in truecm) (need not be an integer)
   %% #2 = width of grid (in truecm) (need not be an integer)
   %% #3 = zero or more statements of the form \ppointij(d,r){...}
          % which causes the box containing the material ... to be placed
          % in such a way that its ij-point is d truecm down and r truecm
          % right from the upper left corner of the grid.
          % Both i and j must be 0, 1, or 2, with 0 and 2 denoting the extremes
          % and 1 denoting the middle. E.g., 10 is the middle of the left
          % edge, while 22 is the lower right corner.
   %% Turn off the grid by putting the command \showgridfalse anywhere before
   %% the \gridbox command.
   %% TeX should be in vertical mode when calling on \gridbox. E.g.,
   %% \centerline{\vbox{\gridbox3/4.4/{\ppoint11(1,1){$0$}\ppoint21(2,1){$0$}}}}
   %% would generate a centered gridbox and print a zero centered at the (1,1)
   %% point of that box and also one centered atop the (2,1) point.

\def\ppoint#1#2(#3,#4)#5{\setbox0=\hbox{#5}
   \dimen0=\ht0\advance\dimen0 by\dp0\divide\dimen0 by-2
   \multiply\dimen0 by#1\advance\dimen0 by#3\gridunits
   \dimen1=\wd0\divide\dimen1 by-2\multiply\dimen1 by#2
   \advance\dimen1 by#4\gridunits\dpoint(\dimen0,\dimen1){#5}}
   %% #1#2 together specify which part of the box \hbox{#5} is to be placed
   %% at the gridpoint(#3,#4), with
   %% #1 = 0 (upper end), 1 (middle), 2 (lower end)
   %% #2 = 0 (left end),  1 (middle), 2 (right end)
   %% #3 = distance down  (in truecm)
   %% #4 = distance right (in truecm)
   %% #5 = material to be placed

\def\gridunits{truecm}\newcount\tickskip\tickskip1\newcount\majortick\majortick5

\def\point(#1,#2)#3{\dpoint(#1\gridunits,#2\gridunits){#3}}
\def\dpoint(#1,#2)#3{\vbox to 0pt{\kern#1
   \hbox{\kern#2{#3}}\vss}\nointerlineskip}
\newcount\rmndr   % this macro returns the remainder of #1 mod #2
\def\rem#1#2{\rmndr=#1{}\divide\rmndr by#2{}%
\multiply\rmndr by-#2{}\advance\rmndr by #1}
\def\cgridw{\gridwidth\finegridw{}\rem\tickcount\majortick%
   \ifnum\rmndr=0{}\gridwidth\roughgridw\fi}
   %% every \majortick line, use double-thick line.

\def\tick#1/{\cgridw\vrule width\gridwidth height0pt depth#1\gridunits}
\def\nexttick#1#2/{\hbox to#1\gridunits{\hfil\tick#2/}}
\newcount\tickcount
\newdimen\finegridw\finegridw0.4pt\newdimen\roughgridw\roughgridw1.6pt
\newdimen\gridwidth
\newif\ifshowgrid \showgridtrue

%********************** TABLE MACROS ************************

\def\tabcap#1#2#3{\null\vskip 1pt \vbox to #3in {\vfill}
  {\ninepoint \centerline{{\bf Tab.~#1.} #2.}}}
   %% #1 = table number
   %% #2 = table caption
   %% #3 = number of inches of space (1 inch = 2.5 cm)

\def\tabcaplong#1#2#3{\null\vskip 1pt \vskip #3in \ninepoint
 \centerline{\hbox{\noindent{\bf Tab.~#1.}
 \vtop{\hsize 4in \noin #2.\smallskip}}}
}
   %% #1 = table number
   %% #2 = table caption
   %% #3 = number of inches of space (1 inch = 2.5 cm)

%********************** AUTOMATIC SEQUENCING ****************

\def\label#1{%
  \ifsamelabel\global\samelabelfalse\else
  \ifmmode\global\advance\eqnum by 1%%% label equations
  \else\global\advance\labelnum by 1%%% label anything else
  \fi\fi
  \edef\griff{label:#1}\edef\inhalt{\lastlabel}\definieres%
  \ifmmode\eqno(\inhalt)\else\inhalt\fi
  \ifdraft\ifmmode\rlap{\fiverm #1}\else\marginal{#1}\fi\fi}
   %% \label{...} increments the label or equation counter, also prints it,
   %% and makes up a label for it, so it can be referred to, using \recall{...}.
   %% If \draft was used earlier, the label ... will also appear in margins.

\def\eqalignlabel#1{{\def\eqno{}\let\labelnum\eqnum\label{#1}}}
   %% for use inside an \eqalignno

\def\labelplus#1#2{\def\labelsub{#2}\relax\label{#1}\def\labelsub{}}
   %% for adjoining something to the number

\def\eqalignlabelplus#1#2{{\def\eqno{}\let\labelnum\eqnum\labelplus{#1}{#2}}}
   %% for use inside an \eqalignno

\def\samenumber{\samelabeltrue}
   %% \samelabel suppresses the next incrementing of a counter

\def\recall#1{\edef\griff{label:#1}\plazieres}%%% Cite numbered item

\newif\ifsamelabel
\def\labelsub{}
\def\lastlabel{\presect\ifmmode\the\eqnum\else\the\labelnum\fi\labelsub}
\def\nextlabel{{\ifmmode\advance\eqnum by 1\else\advance\labelnum by 1\fi\lastlabel}}

   %******************* set up counters ******************

\newcount\blackmarks\blackmarks0
\newcount\eqnum
\newcount\labelnum
\def\restartnums{\eqnum0\labelnum0}
\def\singlecount{\let\labelnum\eqnum}

   %******************* set up numbering *****************
 \newread\testfl
 \def\inputifthere#1{\immediate\openin\testfl=#1
    \ifeof\testfl\message{(#1 does not yet exist)}
    \else\input#1\fi\closein\testfl}

 \inputifthere{\jobname.aux}
 \newwrite\aux
 \immediate\openout\aux=\jobname.aux

\def\remember#1#2{\edef\inhalt{#1}\edef\griff{label:#2}\definieres}

\def\plazieres{\expandafter\ifx\csname\griff\endcsname\relax%
  \xdef\esfehlt{\griff}\blackmark\else{\csname\griff\endcsname}\fi}

\def\definieres{\expandafter\xdef\csname\griff\endcsname{\inhalt}%
 \def\blankkk{ }\expandafter\immediate\write\aux{%
 \string\expandafter\def\string\csname%
 \blankkk\griff\string\endcsname{\inhalt}}}

\def\blackmark{\ifnum\blackmarks=0\global\blackmarks=1%
 \write16{============================================================}%
 \write16{Some forward reference is not yet defined. Re-TeX this file!}%
 \write16{============================================================}%
 \fi\immediate\write16{undefined forward reference: \esfehlt}%
 {\vrule height10pt width2pt depth2pt}\esfehlt%
 {\vrule height10pt width2pt depth2pt}}

\let\showlabel\marginal
\def\marginal#1{\strut\vadjust{\kern-\strutdepth%
\vtop to \strutdepth{\baselineskip\strutdepth\vss\llap{\fiverm#1\ }\null}}}
\def\strutdepth{\dp\strutbox}

%********************** draft *******************************

\newif\ifdraft

\newcount\hour\newcount\minutes
\def\draft{\drafttrue
\headline={\sevenrm \hfill\ifx\filenamed\undefined\jobname\else\filenamed\fi%
(.tex) (as of \ifx\updated\undefined???\else\updated\fi)
 \TeX'ed at {\hour\time\divide\hour by 60{}%
\minutes\hour\multiply\minutes by 60{}%
\advance\time by -\minutes
\the\hour:\ifnum\time<10{}0\fi\the\time\  on \today\hfill}}
}

\def\today{\number\day\space%
\ifcase\month\or January\or February\or March\or April\or May\or June\or
 July\or August\or September\or October\or November\or December\fi%
\space\number\year}

%********************** acknowledgements ********************

\def\Acknowledgments{\goodbreak\bigskip\noindent{\bf
   Acknowledgments.\ }}

%********************** REFERENCES **************************

\def\References{\goodbreak\bigskip\centerline{\bf References}%
   \tocline{\skipsectno\ \  References}{\tocone}{\folio}%
   \bigskip\frenchspacing}

\def\bibitem{\smallskip\noindent}

   %******************* SAT style ************************

\gdef\formfirstauthor{\the\firstname\  \the\lastname}
\gdef\formnextauthor{, \the\firstname\the\lastname}
\gdef\formotherauthor{ and \the\firstname\the\lastname}
\gdef\formlastauthor{,\formotherauthor}

\gdef\formB{\the\au\ [\yr] ``\the\ti'', \the\pb, \the\pl. \setcitelabel}
\gdef\formD{\the\au\ [\yr] ``\the\ti'', dissertation, \the\pl. \setcitelabel}
\gdef\formJ{\the\au\ [\yr] \the\ti, {\sl\the\jr}\ifx\vl\empty%
\else\ {\bf\vl}\fi, \pp. \setcitelabel}
\gdef\formP{\the\au\ [\yr] \the\ti, in {\sl\the\tit},
\getfirstchar\aut\ifx\firstchar\unknownx\else\the\aut, ed\edsop, \fi
\getfirstchar\pub\ifx\firstchar\unknownx\else\the\pub, \fi \the\pl, \pp. \setcitelabel}
\gdef\formR{\the\au\ [\yr] \the\ti\ifx\is\empty\else, \is\fi. \setcitelabel}

   %******************* needed tokens ********************
\newtoks\lastname
\newtoks\firstname
\newtoks\au
\newtoks\aut
\newtoks\ti
\newtoks\tit
\newtoks\pb
\newtoks\pub
\newtoks\pl
\newtoks\jr

\newtoks\rhlau
   %******************* supporting macros ****************

\def\setcitelabel{\edef\griff{cit\rh}\edef\inhalt{\the\rhlau\ \yr}\definieres}
\def\setcitelabel{}

\def\getfirstchar#1{\edef\theword{\the#1}\expandafter\getit\theword:}
\def\getit#1#2:{\def\firstchar{#1}}
\def\unknownx{x}\def\questmark{?}

\newif\ifonesofar
\def\concat#1{\edef\audef{{#1}}\au=\audef}
\def\decodeauthor#1, #2,#3;{\lastname={#1}\firstname={#2}%
\concat{\formfirstauthor}\onesofartrue%
\def\morerhlau{}%
\def\next{#3}\ifx\next\empty\else\def\morerhlau{ et al.}\decodemoreauthor#3;\fi
\edef\morerhlauu{{\the\lastname\morerhlau}}\rhlau=\morerhlauu}
\def\decodemoreauthor#1, #2,#3;{\lastname={#1}\firstname={#2}%
\def\next{#3}\ifx\next\empty\let\formaut=\formlastauthor%
\ifonesofar\ifx\formotherauthor\undefined\else\let\formaut=\formotherauthor%
\fi\fi\concat{\the\au\formaut}%
\else\onesofarfalse\concat{\the\au\formnextauthor}\decodemoreauthor#3;\fi}

\def\lookupp#1{{\global\aut={\vrule height15pt width15pt depth0pt}%
 \global\tit={{\bf the specified proceedings does not exist in our files}}%
 \xdef\edsop{}\global\pub={}\def#1{}\input proceed }}

\def\refproc #1(#2; #3; {\decodeproc#2; \xdef\yr{#3}}
\def\decodeproc#1), #2 (ed#3.),#4 (#5); {%
 \global\tit={#1}\global\aut={#2}\xdef\edsop{#3}\global
 \pub={#4}\global\pl={#5}}

   %******************* basic bib macros *****************

\def\refB #1; #2; #3 (#4); #5; {\decodeauthor#1,;%
   \ti={#2}\pb={#3}\pl={#4}\def\yr{#5}\bibitem\formB}

\def\refD #1; #2; #3; #4; {\decodeauthor#1,;%
   \ti={#2}\pl={#3}\def\yr{#4}\bibitem\formD}

\def\refJ #1; #2; #3; #4; #5; #6; {\decodeauthor#1,;%
    \ti={#2}\jr={#3}\def\vl{#4}\def\yr{#5}\def\pp{#6}\bibitem\formJ}

\def\refP #1; #2; #3; #4; {\lookupp{#3}\decodeauthor#1,;%
        \ti={#2}\def\pp{#4}\bibitem\formP}

\def\refQ #1; #2; (#3; #4; #5; {\decodeproc#3; \decodeauthor#1,;%
   \ti={#2}\def\yr{#4}\def\pp{#5}\bibitem\formP}

\def\refR #1; #2; #3; #4; {\decodeauthor#1,;%
         \ti={#2}\def\is{#3}\def\yr{#4}\bibitem\formR}

\let\refX\bibitem
