% -*- Mode: TEX -*-

%%% To include Postscript illustrations into Tex documents, 
%%% include this file in your preamble. 

%%% Usage : 

%%% Setup \def\illustrationfileprefix{<file-prefix>}

%%% Use \illustration{<filename>} to insert postscript file with ``.ps''
%%% suffix in your document.

%%% Use \illustrationpercent{<filename>}{<percent-scale-factor>} to insert
%%% the illustration in the specified filename with scaling. 
%%% NOTE: The scale factor should be %/100. If you want the figure
%%% scaled by 50%, then the scale factor should 0.5. If you want the
%%% figure scaled by 200%, then the scale factor should be 2.

%%% [acaro]: Rewritten to use EPSF macros instead of psadobe.

\input{epsf}

\newcount\illustrationhoffset
\newcount\illustrationvoffset

\def\illustrationcorner = (#1,#2){%
  \dimen0=#1
  \illustrationhoffset=-\dimen0
  \advance\illustrationhoffset by -32891
  \divide\illustrationhoffset by 65782
  \dimen0=#2
  \illustrationvoffset=\dimen0
  \advance\illustrationvoffset by -52132044
  \divide\illustrationvoffset by 65782}

\def\illustrationfileprefix{}                          % Default is no
                                                       % prefix

\def\illustrationfilesuffix{}                          % Default is no
                                                       % suffix

\illustrationcorner = (1 in, 10.5 in)                  % Default corner is
                                                       %  (1 in, 10.5 in)
\def\illustration#1{\begin{center}
{\leavevmode
 \epsffile{\illustrationfileprefix#1\illustrationfilesuffix}}
 \end{center}}

\def\illcharacter#1{{\psadobe{\illustrationfileprefix#1\illustrationfilesuffix}}}

%\def\illscale{1.0}
%
%\def\epsfsize#1#2{\illscale#1}
%
%\def\illustrationpercent#1#2{\begin{center}
%{\leavevmode
% \def\illustrationscale{#2}
% \epsffile{\illustrationfileprefix#1.ps}}
% \end{center}}
%
%
%
%\def\illustrationscale#1#2{\begin{center}
%{\leavevmode
% \def\illustrationscale{#2}
% \epsffile{\illustrationfileprefix#1.ps}}
% \end{center}}


\def\illustrationxy#1#2#3{\begin{center}
{\leavevmode
 \epsfxsize=#1 \epsfysize=#2
 \epsffile{\illustrationfileprefix#3\illustrationfilesuffix}}
 \end{center}}


\def\illustrationx#1#2{\begin{center}
{\leavevmode
 \epsfxsize=#1
 \epsffile{\illustrationfileprefix#2\illustrationfilesuffix}}
 \end{center}}


\def\illustrationy#1#2{\begin{center}
{\leavevmode
 \epsfysize=#1
 \epsffile{\illustrationfileprefix#2\illustrationfilesuffix}}
 \end{center}}








%%%% Edit History: /home/jj/acaro/Scratch/Dvips/my-illustrations.tex  

%%%+/home/jj/acaro/Scratch/Dvips/my-illustrations.tex 
%%% [acaro] 10/ 1/92 23:17  Modified to use EPSF instead of PSADOBE. I
%%% had to change the illustration percent to take a scale factor
%%% rather than a percent. I also added macros that use the facilities
%%% provided by EPSF for resizing.
