%
%  Depsf.sty    ver 1.0  92/03/26  A.Numaguti
%                        98/12/17  S.Takehiro (dvips �б�) 
%                        98/01/06  S.Takehiro (ĥ�����֤Τ��콤��)
%
%  Default : dvips + epsf.tex
% 
%  To use jvi2kps + postscript.sty, 
%      \documentstyle[postscript,Depsf]{...}
%
%  To use dvi2ps + epsf.sty,
%      \documentstyle[epsf,Depsf]{...}
%
\def\Depsf{\@ifnextchar [{\D@epsf} %% ]
                         {\D@epsf[]}}
\def\D@epsf[#1]{\@ifnextchar [ {\D@@epsf[#1]} %% ]
                               {\D@@epsf[#1][]}}
%
\@ifundefined{psbox}{%      for jvi2kps + postscript.sty
  \@ifundefined{epsfile}{%  for dvi2ps + epsf.sty
%
%  for epsf.tex and dvips
%
     \@ifundefined{epsfile}{\input epsf.tex}{}%
     \gdef\D@@epsf[#1][#2]#3{%
         \epsfclipon%
         \leavevmode%
         \inhibitglue%
         \def\D@epw{#1}\def\D@eph{#2}%
         \ifx\D@epw\@empty\ifx\D@eph\@empty\epsffile{#3}
                          \else\epsfysize=#2\epsffile{#3}\fi
         \else \ifx\D@eph\@empty\epsfxsize=#1\epsffile{#3}
                        \else\epsfxsize=#1\epsfysize=#2\epsffile{#3}\fi
         \fi\epsfclipoff}%
 }{%
%
%  for epsf.sty  and  dvi2ps-j
%
     \gdef\D@@epsf[#1][#2]#3{%
         \def\D@epw{#1}\def\D@eph{#2}%
         \ifx\D@epw\@empty\ifx\D@eph\@empty\epsfile{file=#3}
                          \else\epsfile{file=#3,height=#2}\fi
         \else \ifx\D@eph\@empty\epsfile{file=#3,width=#1}
                          \else\epsfile{file=#3,width=#1,height=#2}\fi
         \fi}
     \gdef\Depsfdrafttrue{\epsfdrafttrue}
  }
}{%
%
%  for postscript.sty and jdvi2kps
%
     \gdef\D@@epsf[#1][#2]#3{%
         \def\D@epw{#1}\def\D@eph{#2}
         \ifx\D@epw\@empty\ifx\D@eph\@empty\psbox{#3}
                          \else\psbox[height=#2]{#3}\fi
         \else \ifx\D@eph\@empty\psbox[width=#1]{#3}
                          \else\psbox[width=#1,height=#2]{#3}\fi
         \fi}
%
      \gdef\Depsfdrafttrue{%
      \gdef\@postscriptbox##1##2##3{%
        \mbox{\vbox to ##2{\hbox to ##1{\tt ##3\hfil}\vfil}}}}
}
