%%UNIX --- UPDATED ON 13/8/97  
%====================================================================%
%                  sprocl.tex     27-Feb-1995                        %
% This latex file rewritten from various sources for use in the      %
% preparation of the standard proceedings Volume, latest version     %
% by Susan Hezlet with acknowledgments to Lukas Nellen.              %
% Some changes are due to David Cassel.                              %
%====================================================================%

\documentstyle[sprocl]{article}

\font\eightrm=cmr8

\input{psfig}

\bibliographystyle{unsrt} %for BibTeX - sorted numerical labels by
                          %order of first citation.

\arraycolsep1.5pt

\def \ms {{\overline{\mbox{MS}}}}

% A useful Journal macro
\def\Journal#1#2#3#4{{#1} {\bf #2}, #3 (#4)}

% Some useful journal names
\def\NCA{\em Nuovo Cimento}
\def\NIM{\em Nucl. Instrum. Methods}
\def\NIMA{{\em Nucl. Instrum. Methods} A}
\def\NPB{{\em Nucl. Phys.} B}
\def\PLB{{\em Phys. Lett.}  B}
\def\PRL{\em Phys. Rev. Lett.}
\def\PRD{{\em Phys. Rev.} D}
\def\ZPC{{\em Z. Phys.} C}

% Some other macros used in the sample text
\def\st{\scriptstyle}
\def\sst{\scriptscriptstyle}
\def\mco{\multicolumn}
\def\epp{\epsilon^{\prime}}
\def\vep{\varepsilon}
\def\ra{\rightarrow}
\def\ppg{\pi^+\pi^-\gamma}
\def\vp{{\bf p}}
\def\ko{K^0}
\def\kb{\bar{K^0}}
\def\al{\alpha}
\def\ab{\bar{\alpha}}
\def\be{\begin{equation}}
\def\ee{\end{equation}}
\def\bea{\begin{eqnarray}}
\def\eea{\end{eqnarray}}
\def\CPbar{\hbox{{\rm CP}\hskip-1.80em{/}}}%temp replacemt due to no font

\def \ms {{\overline{\mbox{MS}}}}
\newcommand{\z}{&&\hspace*{-0.7cm}}
\newcommand{\zz}{&&\hspace*{-0.3cm}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%BEGINNING OF TEXT                           
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{flushright} {
%\vspace{-0.5cm}
\bf US-FT / 06-01 \\ 

} \end{flushright}
%\vskip 0.2cm

\title{HIGHER TWIST OPERATOR EFFECTS TO PARTON DENSITIES AT SMALL $X$}

%\author{J. BARTELS}
%
%\address{Univ. Hamburg,
%Institut f\"ur Theor.
%Physik II\\
%22761 Hamburg, Germany,~
%E-mail: bartels@x4u2.desy.de}

\author{A. V. KOTIKOV}

\address{Bogoliubov Lab. of Theor. Phys., JINR \\
141980 Dubna, Russia,~
E-mail: kotikov@thsun1.jinr.de}

\author{G. PARENTE}

\address{Dep.
%artamento 
de F\'\i sica de Part\'\i culas, 
Univ.
%ersidade 
de Santiago de Compostela\\
15706 Santiago de Compostela, Spain,~
E-mail: gonzalo@fpaxp1.usc.es}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% You may repeat \author \address as often as necessary      %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\maketitle\abstracts{ 
We investigate  the  $Q^2$ evolution of parton distributions
at small $x$ values,
%recently 
obtained in the case
of soft initial conditions.
The contributions of twist-two and (renormalon-type) higher-twist 
operators of the Wilson operator product expansion are taken into account.
The results are in very good agreement with deep inelastic scattering
experimental data from HERA.}

\vskip -0.5cm
The measurements of the deep-inelastic scattering
structure function
(SF)
$F_2$ in HERA
\cite{H1}
have permitted the access to
a very interesting kinematical range for testing the theoretical
ideas on the behavior of quarks and gluons carrying a very low fraction
of momentum of the proton, the so-called small $x$ region.
The reasonable agreement between HERA data and the 
%NLO 
next-to-leading order (NLO)
approximation of
perturbative
QCD that has been observed for $Q^2 \geq 2 $GeV$^2$ (see 
%the recent review in \cite{CoDeRo}
\cite{Q2evo} and references therein) indicates that
%and, thus,
perturbative QCD could describe the SF
evolution 
%of structure functions 
up to very low $Q^2$ values.

The standard program \cite{MRS,KKPS} to study the 
%small $x$ 
behavior of
quarks and gluons
is carried out by comparison of data
with the numerical solution of the
%Dokshitzer-Gribov-Lipatov-Altarelli-Parisi (DGLAP)
DGLAP
equations 
by fitting the parameters of the
$x$ profile of partons at some initial $Q_0^2$. 
However, if one is interested in analyzing exclusively the
small $x$ region ($x \leq 0.01$), 
there is the alternative of doing a simpler analysis
by using some of the existing analytical solutions of DGLAP 
in the small $x$ limit (see, for example, \cite{BF1,Q2evo}).
The main ingredients of the study \cite{Q2evo} are:
\begin{itemize}
\item 
%
%{\bf --} 
%\vskip -0.3cm
Both, the gluon and quark singlet densities are
presented in terms of two components ($'+'$ and $'-'$)
which are obtained from the analytical $Q^2$
dependent expressions of the corresponding ($'+'$ and $'-'$)
parton distributions moments.
\item
%
%{\bf --} 
\vskip -0.3cm
The $'-'$ component is constant
at small $x$, whereas the 
$'+'$ component grows at $Q^2 \geq Q^2_0$ as 
\vskip -0.5cm
$$ 
\hspace*{-0.7cm}
\sim \exp{\left(2\sqrt{\left[
a_+\ln \left(
\frac{a_s(Q^2_0)}{a_s(Q^2)} \right) -
\left( b_+ +  a_+ \frac{\beta_1}{\beta_0} \right)
\Bigl( a_s(Q^2_0) - a_s(Q^2) \Bigr) \right] 
\ln \left( \frac{1}{x}  \right)} \right)},
$$
where the LO term $a_+ = 12/\beta_0$ and the NLO one $b_+ = 412f/(27\beta_0)$. 
Here the coupling constant
$a_s=\alpha_s/(4\pi)$, $\beta_0$ and $\beta_1$ are the first two 
coefficients of QCD 
$\beta$-function and $f$ is the number of active flavors.
\end{itemize}
%\\

We shortly compile below the main results 
%%found in 
of \cite{Q2evo} 
at the leading order (LO)
approximation 
and demonstrate some new (preliminary) results,
% of \cite{Q2evo3}, 
where
the contributions of higher-twist (HT) operators 
(i.e. twist-four ones and twist-six ones)
of
the Wilson operator product expansion are taken into account
in the framework of renormalon model (see \cite{Beneke}).
The importance of the HT contributions 
%of higher-twist operators
at small-$x$ has been demonstrated in 
%many studies (see 
\cite{Bartels}.
%).
\vskip 0.3cm

{\bf 1.} Our purpose
%of this article
is to show the small $x$ asymptotic
form of parton distributions
%(PD)
in the framework of the DGLAP equation starting at some $Q^2_0$ with
the flat function:
\vspace{-0.2cm}
 \begin{eqnarray}
f^{\tau2}_a (Q^2_0) ~=~
A_a ~~~~(\mbox{ hereafter } a=q,g), \label{1}
 \end{eqnarray}
where $f^{\tau2}_a$ are the leading-twist (LT) parts of
parton (quark and gluon)
distributions (PD) multiplied by $x$
and $A_a$ are unknown parameters that have to be determined from data.
Through this work at small $x$ we neglect
the non-singlet quark component
\footnote{
We would like to note that new HERA data \cite{H1} show a rise
of $F_2$ structure function at low $Q^2$ values ($Q^2 \sim 1 $GeV$^2$)
when $x \to 0$ (see Fig.1, for example). The rise can be explained
in a natural way by incorporation  of 
%higher-twist 
HT terms in our
analysis (see Eqs.(\ref{r1})-(\ref{r7})).}.

The full small $x$ asymptotic results
for PD
%parton distributions
 and SF $F_2$ 
%structure function 
at LO 
%of perturbation theory 
is:
%\vskip -0.5cm
\vspace{-0.1cm}
\bea
% \begin{eqnarray}
F_2(x,Q^2) ~=~
%&=& 
e \cdot f_q(x,Q^2),~~~~
%\label{r10} \\ 
%%& & \nonumber \\
 f_a(x,Q^2) ~=~
%&=& 
f^{+}_a(x,Q^2) + 
f^{-}_a(x,Q^2) \; , 
\label{r11}
\end{eqnarray}
where the $'+'$ and $'-'$ components $f^{\pm}_a(x,Q^2)$
%in the renormalon case 
are given by the sum
 \begin{eqnarray}
 f^{\pm}_a(x,Q^2) ~=~ f^{\tau2,\pm}_a(x,Q^2) + 
f^{h\tau,\pm}_a(x,Q^2) \;  
\label{r12}
%\end{eqnarray}
\eea
of
the LT
%leading-twist 
parts $f^{\tau2,\pm}_a(x,Q^2)$ 
%(see Eqs. (\ref{8.0}) and (\ref{8.00})) 
and the HT
%higher-twist 
parts $f^{h\tau,\pm}_a(x,Q^2)$, 
respectively.
%\\


%%%%%%%%%%%% 2.1 %%%%%%

%\subsection{The contribution of twist-two operators} \indent

%{\bf I.1}
The small $x$ asymptotic results for PD, $f^{\tau2,\pm}_a$ 
\vspace{-0.2cm}
\bea
%\begin{eqnarray}
f^{\tau2,+}_g(x,Q^2)&=& \left(A_g + \frac{4}{9} A_q \right)
\tilde I_0(\sigma) \; e^{-\overline d_{+}(1) s} \,+\,O(\rho) 
~~\;\; ,\label{8.0} \\
f^{\tau2,+}_q(x,Q^2)&=& \frac{f}{9}\left(A_g + \frac{4}{9} A_q \right) 
\rho \; \tilde I_1(\sigma) \;
e^{-\overline d_{+}(1) s} \,+\,O(\rho) \; , \label{8.01} 
%\nonumber
\\
f^{\tau2,-}_q(x,Q^2) &=&
%&=&  
A_q e^{- d_{-}(1) s} \,+\,O(x),~
f^{\tau2,-}_g(x,Q^2)~= - \frac{4}{9} f^{\tau2,-}_q(x,Q^2) 
%A_q e^{- d_{-}(1) s} 
%~+~O(x) 
\; ,\label{8.02}
% \nonumber
% \end{eqnarray}
\eea
%\vskip -0.3cm
%\vspace{-0.3cm}
where
$\overline d_{+}(1) = 1+20f/(27\beta_0)$ and
$          d_{-}(1) = 16f/(27\beta_0)$
are the regular parts of $d_{+}$ and $d_{-}$
anomalous dimensions, respectively, in the limit $n\to1$ 
\footnote{From now on, for a quantity $k(n)$ we use the notation
$\hat k(n)$ for the singular part when $n\to1$ and
$\overline k(n)$ for the corresponding regular part. }. 
%
The function $\tilde I_{\nu}$ ($\nu=0,1$) 
%in Eqs. (\ref{8.0,8.01})
coincides with 
%are related to 
the modified Bessel
function $I_{\nu}$ at $s \geq 0$
and 
%to 
the Bessel function $J_{\nu}$ at $s < 0$.
Using the 
%results in \cite{Q2evo3} (which are based on 
calculations
\cite{SMaMaS,method}, we show the HT effect
%of higher-twist corrections 
in the renormalon case.
%(see recent review of renormalon models in \cite{Beneke}). Below we 
We present the results only for the terms proportional of some power
of $\ln{(1/x)}$ (full expressions can be found in the last papaer of 
\cite{Q2evo}),   
%by using twist-two ones in 
%Eqs.(\ref{8.0})-(\ref{8.02}) and
making the following subtitutions
in the corresponding LT
%twist-two 
results presented in
Eqs.(\ref{8.0})-(\ref{8.02}):

\vspace{0.2cm}
$f^{\tau2,+}_a(x,Q^2)$ (see Eqs.(\ref{8.0}),(\ref{8.01})) 
$\to f^{h\tau,+}_a(x,Q^2)$
~~ by
%has the following form:
\vspace{-0.2cm}
\bea 
A_a \biggl\{\tilde I_0(\sigma),~\rho \tilde I_1(\sigma) \biggl\} \,\to\, 
%&\to & 
A_a 
%\cdot  
\biggl\{
\frac{32f}{15\beta_0^2},~\frac{256f}{45\beta_0^2}  \biggl\}
 \, \biggl( 
%& &
\frac{\Lambda^2_{1,a}}{Q^2} -\frac{8}{7} \frac{\Lambda^4_{2,a}}{Q^4}
\biggr)
\,\frac{1}{\rho} \tilde I_1(\sigma)
\,+\, ... ,  
\label{r1}
\eea
%\vskip -0.3cm
where
$\Lambda^2_{1,a}$ and $\Lambda^4_{2,a}$ are magnitudes of twist-four and 
twist-six corrections.

%\vspace{0.2cm}
%The modification 
$f^{\tau2,-}_g(x,Q^2)$ (see Eq.(\ref{8.02}))
 $ \to f^{h\tau,-}_g(x,Q^2)$
~~ by
%has the following form:
\vspace{-0.2cm}
\bea 
A_q ~\to ~ A_q \cdot
\frac{32f}{15\beta_0^2} \, \biggl( 
%& &
\frac{\Lambda^2_{1,q}}{Q^2} -\frac{8}{7} \frac{\Lambda^4_{2,q}}{Q^4}
\biggr)
\, \ln \left(\frac{1}{x} \right) + ~...~.
\label{r6}
\eea

$f^{\tau2,-}_q(x,Q^2)$ (see Eq.(\ref{8.02})) $ \to f^{h\tau,-}_q(x,Q^2)$
~~ by
%becames:
\vspace{-0.2cm}
\bea 
A_q &\to & 
%A_q \cdot
\frac{128f}{45\beta_0^2} \biggl\{ A_q \cdot
\biggl(
\frac{\Lambda^2_{1,q}}{Q^2} \biggl[
\ln \left(\frac{Q^2}{x\Lambda^2_{1,q}} \right)
- \frac{209}{60} -  \frac{8f}{81}
\biggl]
%\ln \left(\frac{1}{x} \right)
~-~
\frac{8}{7} \frac{\Lambda^4_{2,q}}{Q^4} 
\biggl[\ln \left(\frac{Q^2}{x\Lambda^2_{2,q}} \right)
\nonumber \\
& &~- \frac{6517}{3150} -  \frac{8f}{81}
\biggl] \biggl)
%\ln \left(\frac{1}{x} \right)
%\nonumber \\
%&-&
- \frac{2f}{9}
A_g \cdot
%\frac{256f^2}{405\beta_0^2} \,
\biggl( 
%& &
\frac{\Lambda^2_{1,g}}{Q^2} -\frac{8}{7} \frac{\Lambda^4_{2,g}}{Q^4}
\biggr) \biggr\} \,
\ln \left(\frac{1}{x} \right) + ~... ~.
\label{r7}
\eea

%\vskip -0.5cm



%\vskip -0.5cm

\begin{figure}[t]
\psfig{figure=h19495.plt.ps,height=2.0in,width=4.7in}
%\psfig{figure=fi1h.ps,height=5.0in,width=5.in}
\vskip -0.3cm
\caption{The structure function $F_2$ as a function of $x$ for different
$Q^2$ bins. The experimental points are from H1.
% \cite{H1,H1n}. 
The inner error 
bars are statistic while the outer bars represent statistic and systimatic 
errors added in quadrature. 
The 
%dashen and dot-dashed 
curves are obtained 
from fits at LO 
%and NLO 
when the HT contributions 
%of higher-twist terms 
have been incorporated.}
\vskip -0.5cm
% \label{fig:radish}
\end{figure}




{\bf 2.}
With the help of the above equations
%results presented in the previous section 
we have analyzed $F_2$ HERA data at small $x$ from the H1 collaboration.
%In order to keep the analysis as simple as possible we 
We have fixed the number of active flavors $f$=4 and
$\Lambda_{\ms}(n_f=4) = 250$ MeV, which
is a reasonable value extracted from the traditional (higher $x$)
experiments.
Moreover, we put $\Lambda_{1,a}=\Lambda_{2,a}$ in agreement with
%\cite{DaWe}.
\cite{DaWe}.



The results are shown on Fig. 1. 
We found very good agreement between our approach based on QCD 
and HERA data.
The (renormalon-type) HT
%higher-twist 
terms lead to the natural explanation of
the rise of $F_2$ structure function at low values of $Q^2$ and $x$.
%The rise has been discovered in recent HERA experiments.

As a next step of our investigations, we plan to finish this study 
and to investigate HT contributions 
%of higher-twist operators 
to PD and SF relations, 
observed
%, for example, 
in \cite{KoPa,KOPAFL}.

\vskip 0.2cm
A.K. was supported by Alexander von Humboldt fellowship
and by DIS2001 Orgcommittee. 
G.P. was supported in part by Xunta de Galicia
(PGIDT00 PX20615PR) and CICYT (AEN99-0589-C02-02).

\vskip 0.2cm
{\bf References}
%\section*{References}
\begin{thebibliography}{99}
%
\bibitem{H1} H1 Coll.: S. Aid {\it et al.},
{\em Nucl. Phys.} B 
%{\bf 470}, 3 (1996); 
{\bf 497}, 3 (1997);
ZEUS Coll.: M. Derrick {\it et al.},
{\em Zeit. Phys.} C 
%{\bf 2}, 399 (1996); 
{\bf 7}, 609 (1999).
%
%\bibitem{CoDeRo} A.M. Cooper-Sarkar et al.,
%{\em Int.J.Mod.Phys.} A {\bf 13}, 3385 (1998).
%
\bibitem{Q2evo}  A.V. Kotikov and G. Parente,
{\em Nucl. Phys.} B {\bf 549}, 242 (1999);
%%CITATION = ;%% 
;
%%CITATION = ;%%
{\em Nucl.Phys.Proc.Suppl.} B {\bf 99}, 146 (2000);
%%CITATION = ;%%
; 
%%CITATION = ;%%
. 
%%CITATION = ;%%
%
\bibitem{MRS}  A.D. Martin {\it et al.},
%, W.S. Stirling, R.G. Roberts and R.S. Thorne,
%
{\em Eur.Phys.J.} C {\bf 14}, 133 (2000);
%
%\bibitem{GRV}
M. Gluck {\it et al.},
%, E. Reya and A. Vogt,
{\em Eur. Phys. J.} C  {\bf 5}, 461 (1998);
H.L. Lai {\it et al.},
{\em Eur. Phys. J.} C {\bf 12}, 375 (2000).
%
\bibitem{KKPS} G. Parente {\it et al.},
%, A.V. Kotikov and V.G. Krivokhizhin,
{\em Phys. Lett.} B {\bf 333}, 190 (1994);
%%CITATION = ;%%
A.L. Kataev {\it et al.},
%, A.V. Kotikov, G. Parente and A.V. Sidorov,
{\em Phys. Lett.} B {\bf 388}, 179 (1996); 
%%CITATION = ;%%
{\bf 417}, 374 (1998);
%%CITATION = ;%%
{\em Nucl. Phys. Proc. Suppl.} {\bf 64}, 138 (1998);
%%CITATION = ;%%
%A.L. Kataev, G. Parente and A.V. Sidorov,
{\em Nucl. Phys.} B {\bf 573}, 405 (2000).
%
%
\bibitem{BF1} A. De R\'ujula {\it et al.},
{\em Phys. Rev.} D {\bf 10}, 1649 (1974);
 R.D. Ball and S. Forte,
{\em Phys.Lett.} B {\bf 336}, 77 (1994); L. Mankiewicz et al.,
%, A. Saalfeld and T. Weigl,
{\em Phys.Lett.} B {\bf 393}, 175 (1997).
%
%
\bibitem{Beneke} M. Beneke, {\em Phys. Report} {\bf 317}, 1 (1991);
M. Beneke and V.M. Braun, .
%Preprint PITHA-00-25, TPR-00-19 .
%
\bibitem{Bartels}  J. Bartels, 
%Preprint DESY-91 074; 
{\em Phys.Lett.} B {\bf 298}, 204 (1993); {\em Zeit. Phys.} C {\bf 60},
471 (1993);
E.M. Levin {\it et al.},
%, M.G. Ryskin and A.G. Shuvaev, 
{\em Nucl. Phys.} B {\bf 387}, 589 (1992).
%A.D. Martin and M.G. Ryskin,
%Phys. Lett. {\bf B431} (1998) 395;
%J. Bartels and C. Bontus,
%Phys.Rev. {\bf D61} (2000) 034009.
%
\bibitem{SMaMaS}
E.~Stein {\it et al.},
%, M.~Maul,  L.~Mankiewicz, and A.~Sch\"afer, 
{\em Nucl.Phys.} {\bf B536}, 318 (1998).
%
\bibitem{method} A.V. Kotikov, {\em Phys.Atom.Nucl.} {\bf 57}, 133 (1994);
%%CITATION = PANUE,57,133;%%
{\em Phys.Rev.} D {\bf 49}, 5746 (1994).
%%CITATION = PHRVA,D49,5746;%%
%
%
\bibitem{DaWe}  M.~Dasgupta and B.R.~Webber, 
{\em Phys. Lett.} B  {\bf 382}, 273 (1996).
%
\bibitem{KoPa} A.V. Kotikov, {\em JETP Lett.} {\bf 59}, 667 (1994);
%%CITATION = JTPLA,59,667;%%
A.V. Kotikov and G. Parente, {\em Phys. Lett.} B {\bf B379}, 195 (1996). 
%%CITATION = ;%%
%
%
\bibitem{KOPAFL} A.V. Kotikov, {\em JETP}  {\bf 80}, 979 (1995);
%%CITATION = JTPHE,80,979;%%
A.V. Kotikov and G. Parente, ;
%%CITATION = ;%%
%, in 
%Proceeding of International Workshop on Deep Inelastic Scattering 
%and Related Phenomena (1996), Rome, p.237;
{\em Mod. Phys. Lett.} A {\bf 12}, 963 (1997);
%%CITATION = ;%%
{\em JETP} {\bf 85}, 17 (1997); 
%%CITATION = JTPHE,85,17;%%
.
%%CITATION = ;%%
%

\end{thebibliography}

\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% End of sprocl.tex  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




% Psfig/TeX Release 1.2
%
% Archive users note: this is an out-of-date version, preserved because future
% versions are backwards incompatible. Use psfig.sty for the up-to-date
% version.
%
% dvips version
%
% All software, documentation, and related files in this distribution of
% psfig/tex are Copyright 1987, 1988 Trevor J. Darrell
%
% Permission is granted for use and non-profit distribution of psfig/tex 
% providing that this notice be clearly maintained, but the right to
% distribute any portion of psfig/tex for profit or as part of any commercial
% product is specifically reserved for the author.
%
% $Header: psfig.tex,v 1.9 88/01/08 17:42:01 trevor Exp $
% $Source: $
%
% Thanks to Greg Hager (GDH) and Ned Batchelder for their contributions
% to this project.
%
\catcode`\@=11\relax
\newwrite\@unused
\def\typeout#1{{\let\protect\string\immediate\write\@unused{#1}}}
\typeout{psfig/tex 1.2-dvips}


%% Here's how you define your figure path.  Should be set up with null
%% default and a user useable definition.

\def\figurepath{./}
\def\psfigurepath#1{\edef\figurepath{#1}}

%
% @psdo control structure -- similar to Latex @for.
% I redefined these with different names so that psfig can
% be used with TeX as well as LaTeX, and so that it will not 
% be vunerable to future changes in LaTeX's internal
% control structure,
%
\def\@nnil{\@nil}
\def\@empty{}
\def\@psdonoop#1\@@#2#3{}
\def\@psdo#1:=#2\do#3{\edef\@psdotmp{#2}\ifx\@psdotmp\@empty \else
    \expandafter\@psdoloop#2,\@nil,\@nil\@@#1{#3}\fi}
\def\@psdoloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx #4\@nnil \else
       #5\def#4{#2}\ifx #4\@nnil \else#5\@ipsdoloop #3\@@#4{#5}\fi\fi}
\def\@ipsdoloop#1,#2\@@#3#4{\def#3{#1}\ifx #3\@nnil 
       \let\@nextwhile=\@psdonoop \else
      #4\relax\let\@nextwhile=\@ipsdoloop\fi\@nextwhile#2\@@#3{#4}}
\def\@tpsdo#1:=#2\do#3{\xdef\@psdotmp{#2}\ifx\@psdotmp\@empty \else
    \@tpsdoloop#2\@nil\@nil\@@#1{#3}\fi}
\def\@tpsdoloop#1#2\@@#3#4{\def#3{#1}\ifx #3\@nnil 
       \let\@nextwhile=\@psdonoop \else
      #4\relax\let\@nextwhile=\@tpsdoloop\fi\@nextwhile#2\@@#3{#4}}
% 
%
\def\psdraft{
	\def\@psdraft{0}
	%\typeout{draft level now is \@psdraft \space . }
}
\def\psfull{
	\def\@psdraft{100}
	%\typeout{draft level now is \@psdraft \space . }
}
\psfull
\newif\if@prologfile
\newif\if@postlogfile
\newif\if@noisy
\def\pssilent{
	\@noisyfalse
}
\def\psnoisy{
	\@noisytrue
}
\psnoisy
%%% These are for the option list.
%%% A specification of the form a = b maps to calling \@p@@sa{b}
\newif\if@bbllx
\newif\if@bblly
\newif\if@bburx
\newif\if@bbury
\newif\if@height
\newif\if@width
\newif\if@rheight
\newif\if@rwidth
\newif\if@clip
\newif\if@verbose
\def\@p@@sclip#1{\@cliptrue}

%%% GDH 7/26/87 -- changed so that it first looks in the local directory,
%%% then in a specified global directory for the ps file.

\def\@p@@sfile#1{\def\@p@sfile{null}%
	        \openin1=#1
		\ifeof1\closein1%
		       \openin1=\figurepath#1
			\ifeof1\typeout{Error, File #1 not found}
			\else\closein1
			    \edef\@p@sfile{\figurepath#1}%
                        \fi%
		 \else\closein1%
		       \def\@p@sfile{#1}%
		 \fi}
\def\@p@@sfigure#1{\def\@p@sfile{null}%
	        \openin1=#1
		\ifeof1\closein1%
		       \openin1=\figurepath#1
			\ifeof1\typeout{Error, File #1 not found}
			\else\closein1
			    \def\@p@sfile{\figurepath#1}%
                        \fi%
		 \else\closein1%
		       \def\@p@sfile{#1}%
		 \fi}

\def\@p@@sbbllx#1{
		%\typeout{bbllx is #1}
		\@bbllxtrue
		\dimen100=#1
		\edef\@p@sbbllx{\number\dimen100}
}
\def\@p@@sbblly#1{
		%\typeout{bblly is #1}
		\@bbllytrue
		\dimen100=#1
		\edef\@p@sbblly{\number\dimen100}
}
\def\@p@@sbburx#1{
		%\typeout{bburx is #1}
		\@bburxtrue
		\dimen100=#1
		\edef\@p@sbburx{\number\dimen100}
}
\def\@p@@sbbury#1{
		%\typeout{bbury is #1}
		\@bburytrue
		\dimen100=#1
		\edef\@p@sbbury{\number\dimen100}
}
\def\@p@@sheight#1{
		\@heighttrue
		\dimen100=#1
   		\edef\@p@sheight{\number\dimen100}
		%\typeout{Height is \@p@sheight}
}
\def\@p@@swidth#1{
		%\typeout{Width is #1}
		\@widthtrue
		\dimen100=#1
		\edef\@p@swidth{\number\dimen100}
}
\def\@p@@srheight#1{
		%\typeout{Reserved height is #1}
		\@rheighttrue
		\dimen100=#1
		\edef\@p@srheight{\number\dimen100}
}
\def\@p@@srwidth#1{
		%\typeout{Reserved width is #1}
		\@rwidthtrue
		\dimen100=#1
		\edef\@p@srwidth{\number\dimen100}
}
\def\@p@@ssilent#1{ 
		\@verbosefalse
}
\def\@p@@sprolog#1{\@prologfiletrue\def\@prologfileval{#1}}
\def\@p@@spostlog#1{\@postlogfiletrue\def\@postlogfileval{#1}}
\def\@cs@name#1{\csname #1\endcsname}
\def\@setparms#1=#2,{\@cs@name{@p@@s#1}{#2}}
%
% initialize the defaults (size the size of the figure)
%
\def\ps@init@parms{
		\@bbllxfalse \@bbllyfalse
		\@bburxfalse \@bburyfalse
		\@heightfalse \@widthfalse
		\@rheightfalse \@rwidthfalse
		\def\@p@sbbllx{}\def\@p@sbblly{}
		\def\@p@sbburx{}\def\@p@sbbury{}
		\def\@p@sheight{}\def\@p@swidth{}
		\def\@p@srheight{}\def\@p@srwidth{}
		\def\@p@sfile{}
		\def\@p@scost{10}
		\def\@sc{}
		\@prologfilefalse
		\@postlogfilefalse
		\@clipfalse
		\if@noisy
			\@verbosetrue
		\else
			\@verbosefalse
		\fi
}
%
% Go through the options setting things up.
%
\def\parse@ps@parms#1{
	 	\@psdo\@psfiga:=#1\do
		   {\expandafter\@setparms\@psfiga,}}
%
% Compute bb height and width
%
\newif\ifno@bb
\newif\ifnot@eof
\newread\ps@stream
\def\bb@missing{
	\if@verbose{
		\typeout{psfig: searching \@p@sfile \space  for bounding box}
	}\fi
	\openin\ps@stream=\@p@sfile
	\no@bbtrue
	\not@eoftrue
	\catcode`\%=12
	\loop
		\read\ps@stream to \line@in
		\global\toks200=\expandafter{\line@in}
		\ifeof\ps@stream \not@eoffalse \fi
		%\typeout{ looking at :: \the\toks200 }
		\@bbtest{\toks200}
		\if@bbmatch\not@eoffalse\expandafter\bb@cull\the\toks200\fi
	\ifnot@eof \repeat
	\catcode`\%=14
}	
\catcode`\%=12
\newif\if@bbmatch
\def\@bbtest#1{\expandafter\@a@\the#1%%BoundingBox:\@bbtest\@a@}
\long\def\@a@#1%%BoundingBox:#2#3\@a@{\ifx\@bbtest#2\@bbmatchfalse\else\@bbmatchtrue\fi}
\long\def\bb@cull#1 #2 #3 #4 #5 {
	\dimen100=#2 bp\edef\@p@sbbllx{\number\dimen100}
	\dimen100=#3 bp\edef\@p@sbblly{\number\dimen100}
	\dimen100=#4 bp\edef\@p@sbburx{\number\dimen100}
	\dimen100=#5 bp\edef\@p@sbbury{\number\dimen100}
	\no@bbfalse
}
\catcode`\%=14
%
\def\compute@bb{
		\no@bbfalse
		\if@bbllx \else \no@bbtrue \fi
		\if@bblly \else \no@bbtrue \fi
		\if@bburx \else \no@bbtrue \fi
		\if@bbury \else \no@bbtrue \fi
		\ifno@bb \bb@missing \fi
		\ifno@bb \typeout{FATAL ERROR: no bb supplied or found}
			\no-bb-error
		\fi
		%
		\count203=\@p@sbburx
		\count204=\@p@sbbury
		\advance\count203 by -\@p@sbbllx
		\advance\count204 by -\@p@sbblly
		\edef\@bbw{\number\count203}
		\edef\@bbh{\number\count204}
		%\typeout{ bbh = \@bbh, bbw = \@bbw }
}
%
% \in@hundreds performs #1 * (#2 / #3) correct to the hundreds,
%	then leaves the result in @result
%
\def\in@hundreds#1#2#3{\count240=#2 \count241=#3
		     \count100=\count240	% 100 is first digit #2/#3
		     \divide\count100 by \count241
		     \count101=\count100
		     \multiply\count101 by \count241
		     \advance\count240 by -\count101
		     \multiply\count240 by 10
		     \count101=\count240	%101 is second digit of #2/#3
		     \divide\count101 by \count241
		     \count102=\count101
		     \multiply\count102 by \count241
		     \advance\count240 by -\count102
		     \multiply\count240 by 10
		     \count102=\count240	% 102 is the third digit
		     \divide\count102 by \count241
		     \count200=#1\count205=0
		     \count201=\count200
			\multiply\count201 by \count100
		 	\advance\count205 by \count201
		     \count201=\count200
			\divide\count201 by 10
			\multiply\count201 by \count101
			\advance\count205 by \count201
			%
		     \count201=\count200
			\divide\count201 by 100
			\multiply\count201 by \count102
			\advance\count205 by \count201
			%
		     \edef\@result{\number\count205}
}
\def\compute@wfromh{
		% computing : width = height * (bbw / bbh)
		\in@hundreds{\@p@sheight}{\@bbw}{\@bbh}
		%\typeout{ \@p@sheight * \@bbw / \@bbh, = \@result }
		\edef\@p@swidth{\@result}
		%\typeout{w from h: width is \@p@swidth}
}
\def\compute@hfromw{
		% computing : height = width * (bbh / bbw)
		\in@hundreds{\@p@swidth}{\@bbh}{\@bbw}
		%\typeout{ \@p@swidth * \@bbh / \@bbw = \@result }
		\edef\@p@sheight{\@result}
		%\typeout{h from w : height is \@p@sheight}
}
\def\compute@handw{
		\if@height 
			\if@width
			\else
				\compute@wfromh
			\fi
		\else 
			\if@width
				\compute@hfromw
			\else
				\edef\@p@sheight{\@bbh}
				\edef\@p@swidth{\@bbw}
			\fi
		\fi
}
\def\compute@resv{
		\if@rheight \else \edef\@p@srheight{\@p@sheight} \fi
		\if@rwidth \else \edef\@p@srwidth{\@p@swidth} \fi
}
%		
% Compute any missing values
\def\compute@sizes{
	\compute@bb
	\compute@handw
	\compute@resv
}
%
% \psfig
% usage : \psfig{file=, height=, width=, bbllx=, bblly=, bburx=, bbury=,
%			rheight=, rwidth=, clip=}
%
% "clip=" is a switch and takes no value, but the `=' must be present.
\def\psfig#1{\vbox {
	% do a zero width hard space so that a single
	% \psfig in a centering enviornment will behave nicely
	%{\setbox0=\hbox{\ }\ \hskip-\wd0}
	%
	\ps@init@parms
	\parse@ps@parms{#1}
	\compute@sizes
	%
	\ifnum\@p@scost<\@psdraft{
		\if@verbose{
			\typeout{psfig: including \@p@sfile \space }
		}\fi
		%
		\special{ps::[begin] 	\@p@swidth \space \@p@sheight \space
				\@p@sbbllx \space \@p@sbblly \space
				\@p@sbburx \space \@p@sbbury \space
				startTexFig \space }
		\if@clip{
			\if@verbose{
				\typeout{(clip)}
			}\fi
			\special{ps:: doclip \space }
		}\fi
		\if@prologfile
		    \special{ps: plotfile \@prologfileval \space } \fi
		\special{ps: plotfile \@p@sfile \space }
		\if@postlogfile
		    \special{ps: plotfile \@postlogfileval \space } \fi
		\special{ps::[end] endTexFig \space }
		% Create the vbox to reserve the space for the figure
		\vbox to \@p@srheight true sp{
			\hbox to \@p@srwidth true sp{
				\hss
			}
		\vss
		}
	}\else{
		% draft figure, just reserve the space and print the
		% path name.
		\vbox to \@p@srheight true sp{
		\vss
			\hbox to \@p@srwidth true sp{
				\hss
				\if@verbose{
					\@p@sfile
				}\fi
				\hss
			}
		\vss
		}
	}\fi
}}
\def\psglobal{\typeout{psfig: PSGLOBAL is OBSOLETE; use psprint -m instead}}
\catcode`\@=12\relax


