A CONTINUOUS INJECTION PLASMA MODEL FOR THE X-RAY/RADIO KNOTS IN KPC-SCALE JETS OF AGN
S. Sahayanathan\altaffilmark{1}
R. Misra\altaffilmark{2}
A. K. Kembhavi\altaffilmark{2} and C. L. Kaul\altaffilmark{1}
We consider the evolution of a spherically expanding plasma cloud, where there is continuous injection of non-thermal electrons. We compute the time dependent electron distribution and resultant photon spectra taking into account synchrotron, adiabatic and inverse Compton cooling. This model is different from previous works where, instead of a continuous injection of particles, a short injection period was assumed. We apply this model to the radio/optical knots in the large scale jets of AGN, detected in X-rays by {Chandra} and find that the overall broadband spectral features can be reproduced. It is shown that for some sources, constraints on the X-ray spectral index (by a longer {Chandra} observation) will be able to differentiate between the different models. This in turn will put a strong constraint on the acceleration mechanism active in these sources.
ms.tex
%\documentstyle[12pt,aasms4]{article}
\documentclass[12pt,preprint]{aastex}
%\documentclass{aastex}
%\usepackage{emulateapj5}

\newcommand{\gcc}{g~cm$^{-3}\ $}
\newcommand{\sfun}[2]{$#1(#2)\ $}
\newcommand{\rhonot}{$\rho_{\circ}\ $}
\newcommand{\msun}{$M_{\odot}\ $}
\newcommand{\greq}{$\stackrel{>}{ _{\sim}}$}
\newcommand{\lteq}{$\stackrel{<}{ _{\sim}}$}
\def\lta{\mathrel{\spose{\lower 3pt\hbox{$\mathchar"218$}}
     \raise 2.0pt\hbox{$\mathchar"13C$}}}
\def\gta{\mathrel{\spose{\lower 3pt\hbox{$\mathchar"218$}}
     \raise 2.0pt\hbox{$\mathchar"13E$}}}
\newcommand{\etal}{{\it et al. }}

%\shorttitle{}
%\shortauthors{}


\def\mathnew{\mathsurround=0pt}

\def\simov#1#2{\lower .5pt\vbox{\baselineskip0pt \lineskip-.5pt
\ialign{$\mathnew#1\hfil##\hfil$\crcr#2\crcr\sim\crcr}}}

\def\simgreat{\mathrel{\mathpalette\simov >}}
\def\simless{\mathrel{\mathpalette\simov <}}


\begin{document}

%\setcounter{footnote}{3}

\title{A CONTINUOUS INJECTION PLASMA MODEL FOR THE X-RAY/RADIO KNOTS
IN KPC-SCALE JETS OF AGN}



\author{ S. Sahayanathan\altaffilmark{1}, R. Misra\altaffilmark{2}, 
	 A. K. Kembhavi\altaffilmark{2} and C. L. Kaul\altaffilmark{1} }

\altaffiltext{1}{Nuclear Research Laboratory, Bhabha Atomic Research Center, Mumbai, India; sunder@apsara.barc.ernet.in}


\altaffiltext{2}{Inter-University Center for Astronomy and Astrophysics, Post Bag 4,
Ganeshkhind, Pune-411007, India; rmisra@iucaa.ernet.in}


\begin{abstract}
We consider the evolution of a spherically expanding plasma cloud, where 
there is continuous injection of non-thermal
electrons. We compute the time dependent electron distribution and
resultant photon spectra taking into account
synchrotron, adiabatic and inverse Compton cooling. This
model is different from previous works where,
instead of a continuous injection of particles, a short
injection period was assumed.

We apply this model to the radio/optical knots in the large scale
jets of AGN, detected
in X-rays by {\it Chandra} and find that the overall
broadband spectral features can be reproduced. It is
shown that for some sources, constraints on the X-ray
spectral index (by a longer {\it Chandra} observation)
will be able to differentiate between the different
models. This in turn will put a strong constraint
on the acceleration mechanism active in these sources.

\end{abstract}

\keywords{Galaxies: active - galaxies: jets - X-rays: galaxies}

\section{Introduction} \label{sec: I}

The detection of Kilo-parsec (kpc) scale jets with knots in several 
active galactic nuclei (AGN) by the {\it Chandra} observatory
\cite{cha00,tav,samb} has opened a new
window on the nature of these phenomena. The X-ray emission
from jets could be due to Comptonization of the optical/radio
synchrotron photons i.e., synchrotron self-Compton (SSC), Comptonization
of  cosmic micro-wave background photons (IC/CMB), or an
extension of the synchrotron radio/optical emission.
Earlier observations by the {\it Einstein} and
ROSAT satellites, having comparatively limited resolution and sensitivity, had 
not been generally able to differentiate amongst these mechanism (e.g. \cite{bire,har}). 
Based on the
recent {\it Chandra} observation, it has been argued that the
SSC interpretation would require large jet powers and magnetic
fields much lower than the equipartition values \cite{tav,schwartz}. 
A plausible
attractive alternative is to interpret the X-ray emission as
being due to IC/CMB or direct synchrotron, in which case a 
significantly smaller jet power and near-equipartition 
magnetic fields are required \cite{celotti,pes,samb}. For knots where the X-ray
flux is greater than the extrapolation of the radio/optical
spectra to X-ray wavelengths, the emission cannot be due to synchrotron 
emission and hence,
the IC/CMB model is favored. 
On the other hand, for those knots whose X-ray flux is
lower than this extrapolation, 
it is also possible to interpret the emission as being due to
synchrotron from a non-thermal electron distribution with
a high energy cut off. In fact, it has been argued \cite{pes} that for
the knots of 3C271, this is a more plausible explanation, since
the IC/CMB model requires for this source an exceptionally large
Doppler factor.
In low-power FRI jets also, synchrotron origin of X-rays is 
currently accepted \cite{worrall}.
However, for the gigahertz-peaked spectrum (GPS) radio source PKS 1127-145, 
which is suspected 
to be a young FRI radio galaxy, the X-ray emission is probably 
due to IC/CMB \cite{siem}. 




The interpretation of X-ray emission for some sources as being due to synchrotron emission
is interesting, since in this case the X-rays are produced by
particles having much higher energies (by a factor of $\approx 10^4$) than
those emitting in the radio. The presence of high energy electrons
puts constraints on the age of the knot: since these electrons cool
efficiently, they are depleted in time unless they are replenished.
The depletion leads to a time-dependent high energy cutoff in the non-thermal 
electron distribution which reflects as a high frequency exponential 
cutoff in the observed spectra. Since the observed -ray flux is less than
the extrapolation of radio/optical flux in these sources, this
 exponential high frequency cutoff is constrained to be in the soft X-ray
regime. This can be translated to a high energy cutoff in the electron 
distribution which in turn gives an estimate of the age of the knot.
In this model, a knot is formed when a short duration acceleration
process enhances the non-thermal electron density in a jet. These
non-thermal electrons move with a bulk speed $v \approx c$ along the
jet. Thus, from the age of the knot, one can determine the location
in the jet of the short acceleration process. The distance from
the central object and the short duration ( $<<$ the age of the knot)
naturally puts strong constraints on any models of the acceleration
process.

The model outlined above, may be confirmed (or ruled out) by future long
duration {\it Chandra} observations. The model predicts
that the X-ray spectra of the knots should be exponential
(i.e. steep). The photon spectral slope measured during preliminary 
short duration observations of 3C 371 \cite{pes}, is
around $\Gamma = 1.7 \pm 0.4$, in apparent contradiction to
this prediction. However, longer observations are required
to confirm this result. Moreover, the model requires the
coincidence that the age of the knot be equal to the time
required for X-ray emitting electrons to cool. A larger 
survey of X-ray jets have to be sampled to confirm whether
this is statistically plausible.
In this model, it is assumed that the acceleration time-scale
is short (i.e. $t_{acc} << 10^{10}$ sec) and the possible expansion
of the plasma is not taken into account. The acceleration mechanism
of these knots is largely unknown, but if the acceleration is
due to internal shocks (e.g. \cite{spa}), then the acceleration
time scale $t_{acc} \approx R_s/c$, where $R_s$
is a typical shell size. If $R_s \approx $ kpc, then $t_{acc}$ could
be as large as $\approx 10^{11}$ secs.   


In this work, we present an alternative model where the
knot is assumed to be a uniform expanding sphere with continuous
injection of non-thermal particles. The time-dependent electron
distribution and the resultant spectra are computed taking into
account synchrotron, IC/CMB and adiabatic cooling due to the 
expansion of the sphere. Since there is continuous injection
of particles, there is no high energy cut-off but, instead, there
is a time dependent break in the electron distribution where
synchrotron/adiabatic cooling is important. Our motivation here
is to show that this model also explains the observed spectra
and can be distinguished from one time injection models, by
future observational constrains on the X-ray spectral index.  

In the next section, the model is described and
the predicted spectral energy distributions are compared with
observations. \S 3 summarizes and discusses the main results.
Throughout this work, $H_o = 75$ km s$^{-1}$ Mpc$^{-1}$ and 
$q_0 = 0.5$ are adopted.



\section{Spherically expanding plasma model}

We consider a plasma cloud moving relativistically along the jet 
with a bulk Lorentz
factor $\Gamma$. In the rest frame, it is assumed that the plasma
uniformly occupies an expanding sphere of radius
$R (t) = R_o + \beta_{exp} c t$, where $R_o$ is the
initial size of the sphere and $\beta_{exp} << 1$.
At $t = 0$, there are no non-thermal particles
in the system.
A continuous and constant particle injection rate [
i.e. number of particles injected per unit time] for $t > 0$ is assumed, with a power-law
distribution of energy,
\begin{equation}
Q (\gamma) d\gamma = K \gamma^{-p} d\gamma \;\;\; \hbox  {for}\;\;\; \gamma > \gamma_{min}
\end{equation}
where $\gamma$ is the Lorentz factor of the electrons.
The kinetic equation describing the evolution of the
total number of non-thermal particles in the system, $N(\gamma,t)$, is
\begin{equation}
{\partial N(\gamma,t) \over \partial t} + {\partial  \over \partial \gamma} [P(\gamma,t) N(\gamma,t)] = Q (\gamma)
\end{equation}
$P(\gamma,t)$ is the cooling rate given by
\begin{equation}
P(\gamma,t) = -(\dot \gamma_{S} (t) + \dot \gamma_{IC} (t) + \dot \gamma_{A} (t))
\end{equation}
where $\dot \gamma_{S} (t), \dot \gamma_{IC} (t)$ and $\dot \gamma_{A} (t)$,
the cooling rates due to synchrotron, inverse Compton of the CMB and adiabatic
cooling, respectively, are given by
\begin{equation}
\dot \gamma_{S} (t) = {4 \over 3} {\sigma_T \over m_e c} {B^2(t) \over 8 \pi} \gamma^2
\end{equation}

\begin{equation}
\dot \gamma_{IC} (t) = {16 \over 3} {\sigma_T \over m_e c^2} \Gamma^2 \sigma T^4_{cmb} (z) \gamma^2
\end{equation}

\begin{equation}
\dot \gamma_{A} (t) = {\beta_{exp} c \gamma \over R(t)}
\end{equation}
Here, the evolving magnetic field is parameterized to be $B(t) = B_0 (R(t)/R_0)^m$ and $T_{cmb} (z) = 2.73 (1 + z)$ is the temperature of the CMB at the
redshift $z$ of the source. Note that the time $t$ and other quantities in
the above equations are in the rest frame of the plasma.

In this work, Eqn (2) has been 
solved numerically for $N(\gamma, t)$ using the technique given by
\cite{chang}
and the resultant synchrotron
and inverse Compton spectra are computed at an observing time $t = t_o$. As
shown by \cite{der}, since the CMB radiation is not isotropic in the
rest frame of the plasma, the inverse Compton spectrum is also beamed. Finally
the flux at the earth is computed taking into account the Doppler boosting
(e.g. \cite{begel}),
characterized by the Doppler factor $\delta \equiv [\Gamma(1 - \beta\hbox{cos}\theta)]^{-1}$, where $\beta c$ is the bulk velocity and $\theta$ is the
angle between the jet and the line of sight.

While the total non-thermal particle distribution has to be computed
numerically, a qualitative description is possible by comparing cooling
timescales with the observation time $t_o$. The cooling time-scale
due to synchrotron and inverse Compton cooling at a given time $t$ and
Lorentz factor $\gamma$, is $t_c (t,\gamma) \approx 
\gamma/(\dot \gamma_{S} + \dot \gamma_{IC})$. Then, $\gamma_c$, defined
as the $\gamma$ for which this cooling time scale is equal to
the observation time, $t_c (t_o,\gamma_c) \approx t_o$, becomes,
\begin{equation}
\gamma_c \approx {m_e c \over \sigma_T} {t_o^{-1} \over [ {B^2 (t_o) \over 8 \pi} + \Gamma^2 4 c \sigma T^4_{cmb} (z)]}
\end{equation}
The adiabatic cooling time-scale also turns out to be $\approx t_o$,
since $t_a \approx R(t)/\beta_{exp} c \approx 
t_o$ for $R_o << R(t_o)$. 
Thus, the non-thermal particle distribution
at time $t = t_o$ can be divided into three distinct regions:

\noindent (i) $\gamma << \gamma_c$: In this regime, radiative cooling is
not important and $N(\gamma,t_o) \approx K \gamma^{-p} t_o$. The corresponding
spectral index for both synchrotron and inverse Compton is $\alpha = (p-1)/2$.

\noindent (ii) $\gamma >> \gamma_c$: In this regime, either synchrotron
or inverse Compton cooling is dominant and $N(\gamma, t_o) \propto \gamma^{-(p+1)}$. The corresponding
spectral index for both synchrotron and inverse Compton is $\alpha = p/2$.

\noindent (iii) $\gamma \approx \gamma_c$ In this regime, either synchrotron
or inverse Compton cooling as well as adiabatic cooling are important, and
the spectral slope is in the range $(p-1)/2 > \alpha > p/2$. 

The computed spectra depend on the following ten parameters: the observation
time $t_o$, the magnetic field at the time of observation 
$B_f = B (t = t_o)$, the magnetic field
variation index $m$, the
radius of the knot at the time of observation, $R_f = R(t=t_o)$, the index $p$, the minimum
Lorentz factor $\gamma_{min}$, the Doppler factor $\delta$, the bulk
Lorentz factor $\Gamma$, expansion velocity $\beta_{exp}$ and the normalization
of the injection rate $K$. On the other hand, 
there are only three observational
points namely, the radio/optical and X-ray fluxes. Clearly the parameters
are under-constrained and it is not possible to extract meaningful quantitative
estimates.  However, the motivation here is to show that this model can
explain the observed data with reasonable values of the above parameters.

In Figure 1, the computed spectra are compared with the data for different knots
for four sources. The values of the parameters used are tabulated
in Table 1. The injected power in non-thermal particles in the rest
frame is
\begin{equation}
P_{inj} = \int_{\gamma_{min}}^\infty (\gamma m_e c^2) Q (\gamma) d \gamma = K {m_e c^2 \over p-2} \gamma_{min}^{-(p-2)}
\end{equation}
while the power in the jet can be approximated to be (e.g. \cite{cel}),
\begin{equation}
P_{jet} = \pi R^2 \Gamma^2 \beta c (U_p + U_e + U_B)
\end{equation}
where $U_p$, $U_e$ and $U_B$ are the energy densities of the protons,
electrons and the magnetic field, respectively. 
Here, it has been assumed that the protons are cold and the number of
protons is equal to the number of electrons.
The jet power ranges from $10^{46}$ to
$2 \times 10^{48}$ ergs sec$^{-1}$, while the injected power is 
generally three orders of magnitude lower. This means that the
non-thermal acceleration process is inefficient and most of
the jet power is expected to be  carried to the lobes. The magnetic
field $B_f$ is nearly equal to the equipartition values.

Like the results obtained by \cite{samb} and \cite{pes}, the
X-ray emission from the knots in 3C371 and Knot A of 1136-135 are
identified as being due to synchrotron emission. However, in this
case the predicted X-ray spectral index is $\alpha_X = \alpha_{R} + 1/2$
instead of being exponential. Note that this relation between the
spectral indicies is independent of the parameters used to fit the
data. For the rest of the sources, like the earlier results \cite{samb},
the X-ray emission is attributed to IC/CMB. However, for some of the
sources the optical spectral index is now $\alpha_O = \alpha_{R} + 1/2$,
instead of being exponential. 






\section{Summary and Discussion} \label{sec: III}

In this work, it is shown that the observed radio, optical and
X-ray fluxes of knots in kpc scale jets in AGN, can be explained
within a framework of a model where there is continuous injection
of non-thermal particles into an expanding spherical plasma. This 
interpretation can be confirmed (or ruled out) vis-a-vis 
one-time injection models, 
by future measurements of the radio $\alpha_R$, optical $\alpha_O$ 
and X-ray $\alpha_X$ spectral indicies. In particular, the following
cases are possible:

\noindent (i) $\alpha_R \approx \alpha_X$: In this
case, the X-ray emission is probably due to IC/CMB. Both the continuous
injection and one-time injection models are equally viable.

\noindent (ii) $\alpha_X \approx \alpha_R +1/2$
: In this case, the X-ray emission would be due to synchrotron emission
from electrons in the cooling dominated region. The continuous injection
scenario will be favored.

\noindent (iii) $\alpha_X > \alpha_R +1/2$
: In this case, when the X-ray emission is exponentially decreasing, it
should be attributed to the high energy
cutoff in the electron distribution. The one-time injection
scenario will be favored.

\noindent (iv) $\alpha_X < \alpha_R$
: In this case, when the X-ray emission is exponentially increasing, it
should be attributed to the low energy 
cutoff ($\gamma_{min}$) in the electron distribution and the X-ray emission 
should be due to IC/CMB. Both the continuous
injection and one-time injection models are equally viable.

Similar arguments can be put forth for the optical spectral index $\alpha_O$
as compared to the radio. It should be noted that for some older systems the
one time-injection would be the natural scenario, while for younger systems the
continuous one would be more probable. The technique described above will
be able to differentiate between the two and a generic constraint on
the acceleration time-scales and typical age of the knots may be obtained.
A generic model where the injection rate decays in time, may then be
used to fit the observations. The measurement of spectral indicies at
different wave-lengths will also reduce the number of unconstrained 
parameters in the model fitting, leading to reliable estimates of
the system parameters.

Constraints on the acceleration time-scale and the age of the
knots would be the first step toward understanding the driving
mechanism active in these sources. It will then be possible to
compare these time-scales with theoretical results from analytical
or numerical computations, which may finally lead to an understanding
of the origin and nature of jets in AGN.











\acknowledgements



\begin{thebibliography}{}

\bibitem[Biretta \etal 1991] {bire} Biretta, J. A., Stern, C. P., and Harris, D. E., 1991, \aj, 101,1632.


\bibitem[Begelman \& Blandford 1984]{begel} Begelman, M, C., and  Blandford, R. D., 1984, {\it Reviews of Modern Physics}, 56, 255.

\bibitem[Celotti \etal 2001] {celotti} Celotti, A., Ghisellini, G., and Chiaberge, M., 2001, \mnras, 321, L1.

\bibitem[Celotti \etal 1997] {cel} Celotti, A., Padovani, P., and Ghisellini, G., 1997, \mnras, 286,415.

\bibitem[Chang \& Cooper 1970]{chang} Chang, J. S., and Cooper, G., 1970, {\it Journal of Computational Physics}, 6, 1.


\bibitem[Chartas \etal 2000] {cha00} Chartas, G. \etal, 2000, \apj, 542, 645.

\bibitem[Dermer 1995] {der} Dermer, C., 1995, \apj, 446, L63.


\bibitem[Harris \& Stern 1987] {har} Harris, D. E., and Stern, C. P., 1987, \apj, 313, 136.

\bibitem[Pesce \etal 2001] {pes} Pesce, R. M \etal, 2001, \apj, 556, L79.

\bibitem [Tavecchio \etal 2000] {tav} Tavecchio, F., Maraschi, L. Sambruna, R. M., and Urry, C. M., 2000, \apj, 544, L23.

\bibitem[Sambruna \etal 2002] {samb} Sambruna, R. M. \etal , 2002, \apj, 571, 206.

\bibitem[Schwartz \etal 2000] {schwartz} Schwartz, D. A. \etal , 2000, \apj, 540, L69.

\bibitem[Siemiginowska \etal 2002] {siem} Siemiginowska , A. \etal , 2002, \apj, 570, 543.

\bibitem[Spada \etal 2001] {spa} Spada, M., Ghisellini, G., Lazzati, D., and Celotti, A., 2001, \mnras, 325, 1559.

\bibitem[Worrall \etal 2001] {worrall} Worrall, D. M., Birkinshaw, M., and Hardcastle, M. J., 2001, \apj, 570, 543.

\end{thebibliography}

\begin{deluxetable}{rcccccccccc}
\tablewidth{33pc}
\tablecaption{Parameters for model fitting}
\tablehead{
\colhead{Source/Knot}           & \colhead{$B_f$}      &
\colhead{$\gamma_{min}$}          & \colhead{$p$}  &
\colhead{$t_o$}          & \colhead{$\delta$}    &
\colhead{$\Gamma$}  & \colhead{$\beta_{exp}$}  &
\colhead{$P_{inj}$} & \colhead{$P_{jet}$} &
\colhead{$B_f/B_{equ}$}}
\startdata
1136-135 A & 0.9& 2.0& 2.4& 0.2& 5 & 5 & 0.8 & 44.7 & 47.5 & 0.4 \\
         B & 4.0& 20.0& 2.9& 9& 5 & 5 & 0.1 & 44.2 & 47.9 & 0.5 \\
& & & & & &  & &  & & \\
1150+497 A & 2.5& 30.0& 2.85& 9& 5 & 3.5 & 0.1 & 44.2 & 47.3 & 0.4 \\
         B & 4.3& 30.0& 3.3& 9& 5 & 3.5 & 0.1 & 44.1 & 47.3 & 0.75 \\
& & & & & &  & &  & & \\
1354+195 A & 1.7& 40.0& 3.0& 9& 3.5 & 2 & 0.1 & 45.8 & 48.4 & 0.04 \\
         B & 8.0& 25.0& 3.2& 9& 3.5 & 2 & 0.1 & 44.7 & 47.5 & 0.63 \\
& & & & & &  & &  & & \\
3C 371   A & 1.3& 10.0& 2.4& 12& 3.5 & 3.5 & 0.1 & 42.8 & 46.4 & 0.8 \\
         B & 1.0& 10.0& 2.4& 1& 3.5 & 3.5 & 0.5 & 43.5 & 46.0 & 0.9 \\
& & & & & &  & &  & & \\
\tablecomments{Columns:- 1: source and knot name taken from \cite{pes} for
3C371 and the rest from \cite{samb}. 2: magnetic field
in units of $10^{-5}$ Gauss at the observation time, $B_f = B(t= t_o)$. 
3: minimum Lorentz factor
$\gamma_{min}$. 4: non-thermal injection index $p$. 5: observation time 
$t_o$
in units of $10^{11}$ sec. 6;: Doppler factor $\delta$. 
7: bulk Lorentz factor $\Gamma$. 8: log of the injected power in 
ergs s$^{-1}$ $P_{inj}$. 9: log of the total jet power in ergs s$^{-1}$ 
$P_{jet}$. 10: ratio of the magnetic field to the equipartition value. For
all cases, the magnetic field variation index $m$ and the size of the source
at $t = t_o$ is fixed at $1.5$ and $5 \times 10^{21}$ cm, respectively. }
\enddata
\end{deluxetable}


\input psbox.tex

 
\begin{figure*}[h]
\hspace{-1.5cm}
{\mbox{\psboxto(17cm;20cm){f1.eps}}}
\caption{ The observed fluxes in radio, optical and X-ray compared
with model spectra using parameters given in Table 1. The data for
3C 371 are taken from \cite{pes}, while the rest are taken from
\cite{samb}. Triangles (dots) correspond to knot A (B). Errors
are typically 30\% or larger.\label{Figure 1}  }
\end{figure*}





\end{document}












psbox.tex
%
%       %%%%%%%    %%%%%        %%%%%%    %%%%%   %     %
%       %      %  %             %     %  %     %   %   %
%       %      %  %             %     %  %     %    % %
%       %%%%%%%    %%%%%        %%%%%%   %     %     %
%       %               %       %     %  %     %    % %
%       %               %       %     %  %     %   %   %
%       %         %%%%%%        %%%%%%    %%%%%   %     %
%
%       By Jean Orloff
%
% WHAT IS IT:
% psbox is a set of machine-independent TeX macros to
% 1) allow (Encapsulated) PostScript figure inclusion in all versions
%    of TeX (Plain, LaTeX) on all machines using a PostScript printer
% 2) facilitate the communication (e-mail, ftp, ...) of all the files
%    (text, macros, figs) needed to reproduce a TeX document by grouping
%    them together into a single, TeXable file.
%
% History:
%  1.34  \readfilename=final fix for all filename scans; try \psforptips
%  1.33: corrects \psnewinput for LaTeX (still fails if fname=a{b}c)
%  1.32: corrects \psfordvialw and adds .TEX to PSBOXALL(!)
%  1.31: adds \psfordvialw(?)
%  1.30: adds \splitfile & \joinfiles for multi-file management
%  1.24: fix error handling & add \psonlyboxes
%  1.22: makes \drawingBox \global for use in Phyzzx
%  1.21: accepts %%BoundingBox: (atend)
%  1.20: tries to add \psfordvitps for the TeXPS package.
%  1.10: adds \psforoztex, error handling...
%2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 2345678 6 2345678 7 23456789
%
% Checking version no to avoid multiple loadings
\def\temp{1.34}%
\let\tempp=\relax
\expandafter\ifx\csname psboxversion\endcsname\relax
  \message{PSBOX(\temp) loading}%
\else
    \ifdim\temp cm>\psboxversion cm
      \message{PSBOX(\temp) loading}%
    \else
      \message{PSBOX(\psboxversion) is already loaded: I won't load
        PSBOX(\temp)!}%
      \let\temp=\psboxversion
      \let\tempp=\endinput
    \fi
\fi
\tempp
\let\psboxversion=\temp
\catcode`\@=11
% Every macro likes a little privacy...
%
%Trying to tame the variety of \special commands for Postscript: the
%  universal internal command \PSspeci@l##1##2 takes ##1 to be the
%  filename and ##2 to be the integer scale factor*1000 (as for usual
%   TeX \scale commands)
%
\def\psfortextures{%     For TeXtures on the Macintosh
%-----------------
\def\PSspeci@l##1##2{%
\special{illustration ##1\space scaled ##2}%
}}%
\def\psfordvitops{%      For the DVItoPS converter on IBM mainframes
%----------------
\def\PSspeci@l##1##2{%
\special{dvitops: import ##1\space \the\drawingwd \the\drawinght}%
}}%
\def\psfordvips{%      For DVIPS converter on VAX, UNIX and PC's
%--------------
\def\PSspeci@l##1##2{%
%    \special{/@scaleunit 1000 def}% never read dox without trying!
\d@my=0.1bp \d@mx=\drawingwd \divide\d@mx by\d@my% BUG! for large \drawingwd
\special{PSfile=##1\space llx=\psllx\space lly=\pslly\space%
urx=\psurx\space ury=\psury\space rwi=\number\d@mx
}}}%
\def\psforoztex{%        For the OzTeX shareware on the Macintosh
%--------------
\def\PSspeci@l##1##2{%
\special{##1 \space
      ##2 1000 div dup scale
      \number-\psllx\space \number-\pslly\space translate
}}}%
\def\psfordvitps{%       From the UNIX TeXPS package, vers.>3.12
%---------------
% Convert a dimension into the number \psn@sp (in scaled points)
\def\psdimt@n@sp##1{\d@mx=##1\relax\edef\psn@sp{\number\d@mx}}
\def\PSspeci@l##1##2{%
% psfig.psr contains the def of "startTexFig": if you can locate it
% and include the correct pathname, it should work
\special{dvitps: Include0 "psfig.psr"}% contains def of "startTexFig"
\psdimt@n@sp{\drawingwd}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\drawinght}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\psllx bp}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\pslly bp}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\psurx bp}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\psury bp}
\special{dvitps: Literal "\psn@sp\space startTexFig\space"}
\special{dvitps: Include1 "##1"}
\special{dvitps: Literal "endTexFig\space"}
}}%
\def\psfordvialw{%   Try for dvialw, a UNIX public domain
%---------------
\def\PSspeci@l##1##2{
\special{language "PostScript",
position = "bottom left",
literal "  \psllx\space \pslly\space translate
  ##2 1000 div dup scale
  -\psllx\space -\pslly\space translate",
include "##1"}
}}%
\def\psforptips{%   For MS-DOS; LUOMA@brandeis.bitnet
%---------------
\def\PSspeci@l##1##2{{
\d@mx=\psurx bp
\advance \d@mx by -\psllx bp
\divide \d@mx by 1000\multiply\d@mx by \xscale
\incm{\d@mx}
\let\tmpx\dimincm
\d@my=\psury bp
\advance \d@my by -\pslly bp
\divide \d@my by 1000\multiply\d@my by \xscale
\incm{\d@my}
\let\tmpy\dimincm
\d@mx=-\psllx bp
\divide \d@mx by 1000\multiply\d@mx by \xscale
\d@my=-\pslly bp
\divide \d@my by 1000\multiply\d@my by \xscale
\at(\d@mx;\d@my){\special{ps:##1 x=\tmpx, y=\tmpy}}
}}}%
\def\psonlyboxes{%     Draft-like behaviour if none of the others works
%---------------
\def\PSspeci@l##1##2{%
\at(0cm;0cm){\boxit{\vbox to\drawinght
  {\vss\hbox to\drawingwd{\at(0cm;0cm){\hbox{({\tt##1})}}\hss}}}}
}}%
\def\psloc@lerr#1{%
\let\savedPSspeci@l=\PSspeci@l%
\def\PSspeci@l##1##2{%
\at(0cm;0cm){\boxit{\vbox to\drawinght
  {\vss\hbox to\drawingwd{\at(0cm;0cm){\hbox{({\tt##1}) #1}}\hss}}}}
\let\PSspeci@l=\savedPSspeci@l% restore normal output for other figs!
}}%
%\def\psfor...  add your own!
%
% Some common defs
%
\newread\pst@mpin
\newdimen\drawinght\newdimen\drawingwd
\newdimen\psxoffset\newdimen\psyoffset
\newbox\drawingBox
\newcount\xscale \newcount\yscale \newdimen\pscm\pscm=1cm
\newdimen\d@mx \newdimen\d@my
\newdimen\pswdincr \newdimen\pshtincr
\let\ps@nnotation=\relax
{\catcode`\|=0 |catcode`|\=12 |catcode`|%=12 |catcode`~=12
|catcode`#=12 |catcode`*=14
|xdef|backslashother{\}*
|xdef|percentother{%}*
|xdef|tildeother{~}*
|xdef|sharpother{#}*
}%
% useful to display special chars in \tt; fails for \,#,%
\def\R@moveMeaningHeader#1:->{}%
\def\uncatcode#1{%
\edef#1{\expandafter\R@moveMeaningHeader\meaning#1}}%
%
\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution
\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
\def\executeinspecs#1{%
\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}}%
\def\@mpty{}%
% \if\matchin#1#2<=> \iftrue if #1 contains #2, <=>\iffalse otherwise:
% \if\matchexpin: idem, but #1 & #2 are first fully expanded (no \if
% inside!)
% \tmpa & \tmpb contain what's before and after the occurence of #2
\def\matchexpin#1#2{
  \fi%
%\message{(#1>#2)}
  \edef\tmpb{{#2}}%
  \expandafter\makem@tchtmp\tmpb%
  \edef\tmpa{#1}\edef\tmpb{#2}%
  \expandafter\expandafter\expandafter\m@tchtmp\expandafter\tmpa\tmpb\endm@tch%
  \if\match%
}%
\def\matchin#1#2{%
  \fi%
  \makem@tchtmp{#2}%
  \m@tchtmp#1#2\endm@tch%
  \if\match%
}%
\def\makem@tchtmp#1{\def\m@tchtmp##1#1##2\endm@tch{%
  \def\tmpa{##1}\def\tmpb{##2}\let\m@tchtmp=\relax%
  \ifx\tmpb\@mpty\def\match{YN}%
  \else\def\match{YY}\fi%
}}%
% converts any dimen in cm, with 1E-4 cm precision
\def\incm#1{{\psxoffset=1cm\d@my=#1
 \d@mx=\d@my
  \divide\d@mx by \psxoffset
  \xdef\dimincm{\number\d@mx.}
  \advance\d@my by -\number\d@mx cm
  \multiply\d@my by 100
 \d@mx=\d@my
  \divide\d@mx by \psxoffset
  \edef\dimincm{\dimincm\number\d@mx}
  \advance\d@my by -\number\d@mx cm
  \multiply\d@my by 100
 \d@mx=\d@my
  \divide\d@mx by \psxoffset
  \xdef\dimincm{\dimincm\number\d@mx}
}}%
%
%  \ReadPSize{PSfilename} reads the dimensions of a PostScript drawing
%      and stores it in \drawinght(wd)
\newif\ifNotB@undingBox
\newhelp\PShelp{Proceed: you'll have a 5cm square blank box instead of
your graphics (Jean Orloff).}%
\def\s@tsize#1 #2 #3 #4\@ndsize{
  \def\psllx{#1}\def\pslly{#2}%
  \def\psurx{#3}\def\psury{#4}%  needed by a crazyness of dvips!
  \ifx\psurx\@mpty\NotB@undingBoxtrue% this is not a valid one!
  \else
    \drawinght=#4bp\advance\drawinght by-#2bp
    \drawingwd=#3bp\advance\drawingwd by-#1bp
%  !Units related by crazy factors as bp/pt=72.27/72 should be BANNED!
  \fi
  }%
\def\sc@nBBline#1:#2\@ndBBline{\edef\p@rameter{#1}\edef\v@lue{#2}}%
\def\g@bblefirstblank#1#2:{\ifx#1 \else#1\fi#2}%
{\catcode`\%=12
\xdef\B@undingBox{%%BoundingBox}}%
%% is not a true comment in PostScript, even if % is!
\def\ReadPSize#1{
 \readfilename#1\relax
 \let\PSfilename=\lastreadfilename
 \openin\pst@mpin=#1\relax
 \ifeof\pst@mpin \errhelp=\PShelp
   \errmessage{I haven't found your postscript file (\PSfilename)}%
   \psloc@lerr{was not found}%
   \s@tsize 0 0 142 142\@ndsize
   \closein\pst@mpin
 \else
% each entry in \GlobalInputList should be unique
   \if\matchexpin{\GlobalInputList}{, \lastreadfilename}%
   \else\xdef\GlobalInputList{\GlobalInputList, \lastreadfilename}%
     \immediate\write\psbj@inaux{\lastreadfilename,}%
   \fi%
   \loop
     \executeinspecs{\catcode`\ =10\global\read\pst@mpin to\n@xtline}%
     \ifeof\pst@mpin
       \errhelp=\PShelp
       \errmessage{(\PSfilename) is not an Encapsulated PostScript File:
           I could not find any \B@undingBox: line.}%
       \edef\v@lue{0 0 142 142:}%
       \psloc@lerr{is not an EPSFile}%
       \NotB@undingBoxfalse
     \else
       \expandafter\sc@nBBline\n@xtline:\@ndBBline
       \ifx\p@rameter\B@undingBox\NotB@undingBoxfalse
         \edef\t@mp{%
           \expandafter\g@bblefirstblank\v@lue\space\space\space}%
         \expandafter\s@tsize\t@mp\@ndsize
       \else\NotB@undingBoxtrue
       \fi
     \fi
   \ifNotB@undingBox\repeat
   \closein\pst@mpin
 \fi
\message{#1}%
}%
%
% \psboxto(xdim;ydim){psfilename}: you specify the dimensions and
%    TeX uniformly scales to fit the largest one. If xdim=0pt, the
%    scale is fully determined by ydim and vice versa.
%    Notice: psboxes are a real vboxes; couldn't take hbox otherwise all
%    indentation and all cr's would be interpreted as spaces (hugh!).
%
\def\psboxto(#1;#2)#3{\vbox{
   \ReadPSize{#3}%
   \divide\drawingwd by 1000
   \divide\drawinght by 1000
   \d@mx=#1
   \ifdim\d@mx=0pt\xscale=1000
         \else \xscale=\d@mx \divide \xscale by \drawingwd\fi
   \d@my=#2
   \ifdim\d@my=0pt\yscale=1000
         \else \yscale=\d@my \divide \yscale by \drawinght\fi
   \ifnum\yscale=1000
         \else\ifnum\xscale=1000\xscale=\yscale
                    \else\ifnum\yscale<\xscale\xscale=\yscale\fi
              \fi
   \fi
   \divide\pswdincr by 1000 \multiply\pswdincr by \xscale
   \divide\pshtincr by 1000 \multiply\pshtincr by \xscale
   \divide\psxoffset by1000 \multiply\psxoffset by\xscale
   \divide\psyoffset by1000 \multiply\psyoffset by\xscale
   \global\divide\pscm by 1000
   \global\multiply\pscm by\xscale
   \multiply\drawingwd by\xscale \multiply\drawinght by\xscale
   \ifdim\d@mx=0pt\d@mx=\drawingwd\fi
   \ifdim\d@my=0pt\d@my=\drawinght\fi
   \message{scaled \the\xscale}%
 \hbox to\d@mx{\hss\vbox to\d@my{\vss
   \global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{
      \kern-\psyoffset
      \PSspeci@l{\PSfilename}{\the\xscale}%
      \vss}\hss\ps@nnotation}%
   \advance\pswdincr by \drawingwd
   \advance\pshtincr by \drawinght
   \global\wd\drawingBox=\the\pswdincr
   \global\ht\drawingBox=\the\pshtincr
   \baselineskip=0pt
   \copy\drawingBox
 \vss}\hss}%
  \global\psxoffset=0pt
  \global\psyoffset=0pt
  \global\pswdincr=0pt
  \global\pshtincr=0pt % These are local to one figure
  \global\pscm=1cm %should not be necessary
  \global\drawingwd=\drawingwd
  \global\drawinght=\drawinght
}}%
%
% \psboxscaled{scalefactor*1000}{PSfilename} allows to bypass the
%   rounding errors of TeX integer divisions for situations where the
%   TeX box should fit the original BoundingBox with a precision better
%   than 1/1000.
%
\def\psboxscaled#1#2{\vbox{
  \ReadPSize{#2}%
  \xscale=#1
  \message{scaled \the\xscale}%
  \advance\drawingwd by\pswdincr\advance\drawinght by\pshtincr
  \divide\pswdincr by 1000 \multiply\pswdincr by \xscale
  \divide\pshtincr by 1000 \multiply\pshtincr by \xscale
  \divide\psxoffset by1000 \multiply\psxoffset by\xscale
  \divide\psyoffset by1000 \multiply\psyoffset by\xscale
  \divide\drawingwd by1000 \multiply\drawingwd by\xscale
  \divide\drawinght by1000 \multiply\drawinght by\xscale
  \global\divide\pscm by 1000
  \global\multiply\pscm by\xscale
  \global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{
     \kern-\psyoffset
     \PSspeci@l{\PSfilename}{\the\xscale}%
     \vss}\hss\ps@nnotation}%
  \advance\pswdincr by \drawingwd
  \advance\pshtincr by \drawinght
  \global\wd\drawingBox=\the\pswdincr
  \global\ht\drawingBox=\the\pshtincr
  \baselineskip=0pt
  \copy\drawingBox
  \global\psxoffset=0pt
  \global\psyoffset=0pt
  \global\pswdincr=0pt
  \global\pshtincr=0pt % These are local to one figure
  \global\pscm=1cm
  \global\drawingwd=\drawingwd
  \global\drawinght=\drawinght
}}%
%
%  \psbox{PSfilename} makes a TeX box having the minimal size to
%      enclose the picture
\def\psbox#1{\psboxscaled{1000}{#1}}%
%------------------------------------------------------
%  \joinfiles file1, file2, ...n \into joinedfilename .
%     makes one file out of many
%  \splitfile joinedfilename
%     the opposite
\newif\ifn@teof\n@teoftrue
\newif\ifc@ntrolline
\newif\ifmatch
\newread\j@insplitin
\newwrite\j@insplitout
\newwrite\psbj@inaux
\immediate\openout\psbj@inaux=psbjoin.aux
\immediate\write\psbj@inaux{\string\joinfiles}%
\immediate\write\psbj@inaux{\jobname,}%
%
% INPUT REDEFINITION
%
% works if #1 is a single character
\def\toother#1{\ifcat\relax#1\else\expandafter%
  \toother@ux\meaning#1\endtoother@ux\fi}%
\def\toother@ux#1 #2#3\endtoother@ux{\def\tmp{#3}%
  \ifx\tmp\@mpty\def\tmp{#2}\let\next=\relax%
  \else\def\next{\toother@ux#2#3\endtoother@ux}\fi%
\next}%
%
% \readfilename defs:
%
\let\readfilenamehook=\relax
\def\re@d{\expandafter\re@daux}% spares typing 10 \expandafter's...
\def\re@daux{\futurelet\nextchar\stopre@dtest}%
\def\re@dnext{\xdef\lastreadfilename{\lastreadfilename\nextchar}%
  \afterassignment\re@d\let\nextchar}%
\def\stopre@d{\egroup\readfilenamehook}%
\def\stopre@dtest{%
  \ifcat\nextchar\relax\let\nextread\stopre@d
  \else
    \ifcat\nextchar\space\def\nextread{%
      \afterassignment\stopre@d\chardef\nextchar=`}%
    \else\let\nextread=\re@dnext
      \toother\nextchar
      \edef\nextchar{\tmp}%
    \fi
  \fi\nextread}%
\def\readfilename{\vbox\bgroup%
  \let\\=\backslashother \let\%=\percentother \let\~=\tildeother
  \let\#=\sharpother \xdef\lastreadfilename{}%
  \re@d}%
%
% redefines \input using \readfilename
%
\xdef\GlobalInputList{\jobname}%
\def\psnewinput{%
  \def\readfilenamehook{% each entry in \GlobalInputList should be unique
    \if\matchexpin{\GlobalInputList}{, \lastreadfilename}%
    \else\xdef\GlobalInputList{\GlobalInputList, \lastreadfilename}%
      \immediate\write\psbj@inaux{\lastreadfilename,}%
    \fi%
    \ps@ldinput\lastreadfilename\relax%
    \let\readfilenamehook=\relax%
  }\readfilename%
}%
\expandafter\ifx\csname @@input\endcsname\relax    % then Plain
  \immediate\let\ps@ldinput=\input\def\input{\psnewinput}%
\else
  \immediate\let\ps@ldinput=\@@input
  \def\@@input{\psnewinput}%
\fi%
%
\def\nowarnopenout{%
 \def\warnopenout##1##2{%
   \readfilename##2\relax
   \message{\lastreadfilename}%
   \immediate\openout##1=\lastreadfilename\relax}}%
\def\warnopenout#1#2{%
 \readfilename#2\relax
 \def\t@mp{TrashMe,psbjoin.aux,psbjoint.tex,}\uncatcode\t@mp
 \if\matchexpin{\t@mp}{\lastreadfilename,}%
 \else
   \immediate\openin\pst@mpin=\lastreadfilename\relax
   \ifeof\pst@mpin
     \else
     \errhelp{If the content of this file is so precious to you, abort (ie
press x or e) and rename it before retrying.}%
     \errmessage{I'm just about to replace your file named \lastreadfilename}%
   \fi
   \immediate\closein\pst@mpin
 \fi
 \message{\lastreadfilename}%
 \immediate\openout#1=\lastreadfilename\relax}%
% % will have an unusual catcode below; use * instead
%\vbox
{\catcode`\%=12\catcode`\*=14
\gdef\splitfile#1{*
 \readfilename#1\relax
 \immediate\openin\j@insplitin=\lastreadfilename\relax
 \ifeof\j@insplitin
   \message{! I couldn't find and split \lastreadfilename!}*
 \else
   \immediate\openout\j@insplitout=TrashMe
   \message{< Splitting \lastreadfilename\space into}*
   \loop
     \ifeof\j@insplitin
       \immediate\closein\j@insplitin\n@teoffalse
     \else
       \n@teoftrue
       \executeinspecs{\global\read\j@insplitin to\spl@tinline\expandafter
         \ch@ckbeginnewfile\spl@tinline%Beginning-Of-File-Named:%\endcheck}*
       \ifc@ntrolline
       \else
         \toks0=\expandafter{\spl@tinline}*
         \immediate\write\j@insplitout{\the\toks0}*
       \fi
     \fi
   \ifn@teof\repeat
   \immediate\closeout\j@insplitout
 \fi\message{>}*
}*
\gdef\ch@ckbeginnewfile#1%Beginning-Of-File-Named:#2%#3\endcheck{*
 \def\t@mp{#1}*
 \ifx\@mpty\t@mp
   \def\t@mp{#3}*
   \ifx\@mpty\t@mp
     \global\c@ntrollinefalse
   \else
     \immediate\closeout\j@insplitout
     \warnopenout\j@insplitout{#2}*
     \global\c@ntrollinetrue
   \fi
 \else
   \global\c@ntrollinefalse
 \fi}*
\gdef\joinfiles#1\into#2{*
 \message{< Joining following files into}*
 \warnopenout\j@insplitout{#2}*
 \message{:}*
 {*
 \edef\w@##1{\immediate\write\j@insplitout{##1}}*
\w@{% This collection of files was produced with CERN psbox package}*
\w@{% To decompose and tex it:}*
\w@{%-save this with a filename CONTAINING ONLY LETTERS and a .TEX}*
\w@{% extension (say, JOINTFIL.TEX), in some uncrowded directory;}*
\w@{%-make sure you can \string\input\space psbox.tex (version>=1.3);}*
\w@{%  (else ftp cs.nyu.edu(=128.122.140.24):pub/TeX/psbox/, then get}*
\w@{%  and tex the file psboxall.tex; more info in psbREAD.ME)}*
\w@{%-tex JOINTFIL.TEX using Plain, or LaTeX, or whatever is needed by}*
\w@{%  the first file in the joining (after splitting JOINTFIL.TEX into}*
\w@{%  it's constituents, TeX will try to process it as it stands).}*
\w@{\string\input\space psbox.tex}*
\w@{\string\splitfile{\string\jobname}}*
\w@{\string\let\string\autojoin=\string\relax}*
}*
 \expandafter\tre@tfilelist#1, \endtre@t
 \immediate\closeout\j@insplitout
 \message{>}*
}*
\gdef\tre@tfilelist#1, #2\endtre@t{*
 \readfilename#1\relax
 \ifx\@mpty\lastreadfilename
 \else
   \immediate\openin\j@insplitin=\lastreadfilename\relax
   \ifeof\j@insplitin
     \errmessage{I couldn't find file \lastreadfilename}*
   \else
     \message{\lastreadfilename}*
     \immediate\write\j@insplitout{%Beginning-Of-File-Named:\lastreadfilename}*
     \executeinspecs{\global\read\j@insplitin to\oldj@ininline}*
     \loop
       \ifeof\j@insplitin\immediate\closein\j@insplitin\n@teoffalse
       \else\n@teoftrue
         \executeinspecs{\global\read\j@insplitin to\j@ininline}*
         \toks0=\expandafter{\oldj@ininline}*
         \let\oldj@ininline=\j@ininline
         \immediate\write\j@insplitout{\the\toks0}*
       \fi
     \ifn@teof
     \repeat
   \immediate\closein\j@insplitin
   \fi
   \tre@tfilelist#2, \endtre@t
 \fi}*
}%
% To be put at the end of a file, for making a tar-like file containing
%   everything it used.
\def\autojoin{%
 \immediate\write\psbj@inaux{\string\into{psbjoint.tex}}%
 \immediate\closeout\psbj@inaux
 \expandafter\joinfiles\GlobalInputList\into{psbjoint.tex}%
}%
%----------------------------------------------------------------
%  Annotations & Captions etc...
%
%
% \centinsert{anybox} is just a centered \midinsert, but is included as
%    people barely use the original inserts from TeX.
%
\def\centinsert#1{\midinsert\line{\hss#1\hss}\endinsert}%
\def\psannotate#1#2{\vbox{%
  \def\ps@nnotation{#2\global\let\ps@nnotation=\relax}#1}}%
\def\pscaption#1#2{\vbox{%
   \setbox\drawingBox=#1
   \copy\drawingBox
   \vskip\baselineskip
   \vbox{\hsize=\wd\drawingBox\setbox0=\hbox{#2}%
     \ifdim\wd0>\hsize
       \noindent\unhbox0\tolerance=5000
    \else\centerline{\box0}%
    \fi
}}}%
% for compatibility with older versions, but \psfig is a bad name!
%\def\psfig#1#2#3{\pscaption{\psannotate{#1}{#2}}{#3}}
%\def\psfigurebox#1#2#3{\pscaption{\psannotate{\psbox{#1}}{#2}}{#3}}
%
% \at(#1;#2)#3 puts #3 at #1-higher and #2-right of the current
%    position without moving it (to be used in annotations).
\def\at(#1;#2)#3{\setbox0=\hbox{#3}\ht0=0pt\dp0=0pt
  \rlap{\kern#1\vbox to0pt{\kern-#2\box0\vss}}}%
%
% \gridfill(ht;wd) makes a 1cm*1cm grid of ht by wd whose lower-left
%   corner is the current point
\newdimen\gridht \newdimen\gridwd
\def\gridfill(#1;#2){%
  \setbox0=\hbox to 1\pscm
  {\vrule height1\pscm width.4pt\leaders\hrule\hfill}%
  \gridht=#1
  \divide\gridht by \ht0
  \multiply\gridht by \ht0
  \gridwd=#2
  \divide\gridwd by \wd0
  \multiply\gridwd by \wd0
  \advance \gridwd by \wd0
  \vbox to \gridht{\leaders\hbox to\gridwd{\leaders\box0\hfill}\vfill}}%
%
% Useful to measure where to put annotations
\def\fillinggrid{\at(0cm;0cm){\vbox{%
  \gridfill(\drawinght;\drawingwd)}}}%
%
% \textleftof\anybox: Sample text\endtext
%   inserts "Sample text" on the left of \anybox ie \vbox, \psbox.
%   \textrightof is the symmetric (not documented, too uggly)
% Welcome any suggestion about clean wraparound macros from
%   TeXhackers reading this
%
\def\textleftof#1:{%
  \setbox1=#1
  \setbox0=\vbox\bgroup
    \advance\hsize by -\wd1 \advance\hsize by -2em}%
\def\textrightof#1:{%
  \setbox0=#1
  \setbox1=\vbox\bgroup
    \advance\hsize by -\wd0 \advance\hsize by -2em}%
\def\endtext{%
  \egroup
  \hbox to \hsize{\valign{\vfil##\vfil\cr%
\box0\cr%
\noalign{\hss}\box1\cr}}}%
%
% \frameit{\thick}{\skip}{\anybox}
%    draws with thickness \thick a box around \anybox, leaving \skip of
%    blank around it. eg \frameit{0.5pt}{1pt}{\hbox{hello}}
% \boxit{\anybox} is a shortcut.
\def\frameit#1#2#3{\hbox{\vrule width#1\vbox{%
  \hrule height#1\vskip#2\hbox{\hskip#2\vbox{#3}\hskip#2}%
        \vskip#2\hrule height#1}\vrule width#1}}%
\def\boxit#1{\frameit{0.4pt}{0pt}{#1}}%
%
%
\catcode`\@=12 % cs containing @ are unreachable
%
% CUSTOMIZE YOUR DEFAULT DRIVER:
%    Uncomment the line corresponding to your TeX system:
%\psfortextures%     For TeXtures on the Macintosh
%\psforoztex   %     For OzTeX shareware on the Macintosh
%\psfordvitops %     For the DVItoPS converter for TeX on IBM mainframes
 \psfordvips   %     For DVIPS converter on VAX and UNIX
%\psfordvitps  %     For dvitps from TeXPS package under UNIX
%\psfordvialw  %     For dvialw, UNIX public domain
%\psonlyboxes  %     Blank Boxes (when all else fails).

astro-ph0304068.extracted_bib
\begin{thebibliography}{}

\bibitem[Biretta \etal 1991] {bire} Biretta, J. A., Stern, C. P., and Harris, D. E., 1991, \aj, 101,1632.


\bibitem[Begelman \& Blandford 1984]{begel} Begelman, M, C., and  Blandford, R. D., 1984, {\it Reviews of Modern Physics}, 56, 255.

\bibitem[Celotti \etal 2001] {celotti} Celotti, A., Ghisellini, G., and Chiaberge, M., 2001, \mnras, 321, L1.

\bibitem[Celotti \etal 1997] {cel} Celotti, A., Padovani, P., and Ghisellini, G., 1997, \mnras, 286,415.

\bibitem[Chang \& Cooper 1970]{chang} Chang, J. S., and Cooper, G., 1970, {\it Journal of Computational Physics}, 6, 1.


\bibitem[Chartas \etal 2000] {cha00} Chartas, G. \etal, 2000, \apj, 542, 645.

\bibitem[Dermer 1995] {der} Dermer, C., 1995, \apj, 446, L63.


\bibitem[Harris \& Stern 1987] {har} Harris, D. E., and Stern, C. P., 1987, \apj, 313, 136.

\bibitem[Pesce \etal 2001] {pes} Pesce, R. M \etal, 2001, \apj, 556, L79.

\bibitem [Tavecchio \etal 2000] {tav} Tavecchio, F., Maraschi, L. Sambruna, R. M., and Urry, C. M., 2000, \apj, 544, L23.

\bibitem[Sambruna \etal 2002] {samb} Sambruna, R. M. \etal , 2002, \apj, 571, 206.

\bibitem[Schwartz \etal 2000] {schwartz} Schwartz, D. A. \etal , 2000, \apj, 540, L69.

\bibitem[Siemiginowska \etal 2002] {siem} Siemiginowska , A. \etal , 2002, \apj, 570, 543.

\bibitem[Spada \etal 2001] {spa} Spada, M., Ghisellini, G., Lazzati, D., and Celotti, A., 2001, \mnras, 325, 1559.

\bibitem[Worrall \etal 2001] {worrall} Worrall, D. M., Birkinshaw, M., and Hardcastle, M. J., 2001, \apj, 570, 543.

\end{thebibliography}