%
%  Depspic.sty                      ver 1.0 92/03/25
%
% following environments are defined
%
%  \begin{Depspic}(width,height)(orgx,orgy) \end{Depspic}
%  \begin{Depspic}(width,height)            \end{Depspic}
%
% following commands are defined
%
%  \Deput(x,y){body}
%  \Deputc(x,y){body}
%  \Deputl(x,y){body}
%  \Deputr(x,y){body}
%
%  \Dpt
%  \Depsx \Depsxhalf
%  \Depsy \Depsyhalf
%
% specify absolute path for D?lcorner.ps
%
\def\D@ulcornerps{/usr/local/lib/dvi2ps/Dulcorner.ps}
\def\D@llcornerps{/usr/local/lib/dvi2ps/Dllcorner.ps}
%
\newlength\Dpt \Dpt=65782sp
\unitlength=\Dpt
\newcount{\@Dput}
\newcount{\@Depspicyoff}
%
\newlength\D@twidth \newlength\D@hwidth
\D@twidth=\textwidth \divide\D@twidth by\unitlength 
\D@hwidth=\D@twidth \divide\D@hwidth by 2
\def\Depsx{\number\D@twidth}
\def\Depsxhalf{\number\D@hwidth}
\newlength\D@theight \newlength\D@hheight 
\D@theight=\textheight \divide\D@theight by\unitlength 
\D@hheight=\D@theight \divide\D@hheight by 2
\def\Depsy{\number\D@theight}
\def\Depsyhalf{\number\D@hheight}
%
\def\Depspic(#1,#2){\@ifnextchar( % )
 {\@Depspic(#1,#2)}{\@Depspic(#1,#2)(0,0)}}
\let\endDepspic\endpicture

\@ifundefined{@lands}{%
 \def\@Depspic(#1,#2)(#3,#4)#5{%
  \ifnum#3=\z@\ifnum#4=\z@
  \special{PSfile=\D@llcornerps ury=#2}\fi\fi
%  \special{%\@ifundefined{epsfile}{\input epsf.tex}{}%
%          \epsfysize=#2\epsffile{\D@llcornerps}}\fi\fi
%%%  \special{\Depsf[][#2]{\D@llcornerps}}\fi\fi
%%%  \special{epsfile=\D@llcornerps\space vsize=#2}\fi\fi
  \special{PSfile=#5 ury=#2}
%  \special{%\@ifundefined{epsfile}{\input epsf.tex}{}%
%           \epsfysize=#2\epsffile{#5}}
%%%  \special{\Depsf[][#2]{#5}}
%%%  \special{epsfile=#5 vsize=#2}
  \noindent\picture(#1,#2)(#3,#4)}

 \def\Deput(#1,#2)#3{%
           \put(#1,#2){#3}}     
 \def\Deputc(#1,#2)#3{%
           \put(#1,#2){\makebox(0,0){#3}}}     
 \def\Deputl(#1,#2)#3{%
           \put(#1,#2){\makebox(0,0)[l]{#3}}}     
 \def\Deputr(#1,#2)#3{%
           \put(#1,#2){\makebox(0,0)[r]{#3}}}
}{%
 \def\@Depspic(#1,#2)(#3,#4)#5{%
  \ifnum#3=\z@\ifnum#4=\z@
%  \special{\@ifundefined{epsfile}{\input epsf.tex}{}%
%           \epsfysize=#2\epsffile{\D@ulcornerps}}\fi\fi
%%%  \special{\Depsf[][#2]{\D@ulcornerps}}\fi\fi
  \special{epsfile=\D@ulcornerps\space vsize=#2}\fi\fi
  \@Depspicyoff=#3\multiply \@Depspicyoff by 2
  \advance\@Depspicyoff by #2 \multiply \@Depspicyoff by -1
%  \special{\@ifundefined{epsfile}{\input epsf.tex}{}%
%           \epsfysize=#2\epsffile{#5}}
%%%  \special{\Depsf[][#2]{#5}}
  \special{epsfile=#5 vsize=#2}
  \noindent\picture(#1,#2)(#4,#3)}

 \def\Deput(#1,#2)#3{%
           \@Dput=\@Depspicyoff \advance\@Dput by #1 \multiply \@Dput by -1
           \put(#2,\@Dput){#3}}
 \def\Deputc(#1,#2)#3{%
           \@Dput=\@Depspicyoff \advance\@Dput by #1 \multiply \@Dput by -1
           \put(#2,\@Dput){\makebox(0,0){#3}}}     
 \def\Deputl(#1,#2)#3{%
           \@Dput=\@Depspicyoff \advance\@Dput by #1 \multiply \@Dput by -1
           \put(#2,\@Dput){\makebox(0,0)[l]{#3}}}     
 \def\Deputr(#1,#2)#3{%
           \@Dput=\@Depspicyoff \advance\@Dput by #1 \multiply \@Dput by -1
           \put(#2,\@Dput){\makebox(0,0)[r]{#3}}}
}
%
\endinput
%%%% followings are comment %%%%%%%%%%%%%%%%%%%%%%
%%%% following ps code must be installed under specified file name %%%%
%%%% Dllcorner.ps %%%%
%!
%%BoundingBox: 0 0 100 100
newpath
3 0 moveto
0 0 lineto
0 3 lineto
1.0 setlinewidth
stroke
%%%% Dulcorner.ps %%%%
%!
%%BoundingBox: 0 0 100 100
newpath
3 100 moveto
0 100 lineto
0  97 lineto
1.0 setlinewidth
stroke
%%%% end of comment %%%%%%%


