% -*- Mode: TeX -*-

%%%% TeX Macros for Merging PostScript Illustrations

%%% Gerald Roylance 1987

\newbox\psboxvoid  % An empty box for a LaTeX hack

% psbox (width, height, filename)
%   puts the origin at the lower left corner of the box

\def\psbox#1#2#3{%
   \unhbox\psboxvoid%  demand horizontal mode
   \hbox to #1{\vbox to #2{\vfil}\special{psfile=#3}\hfil}}

% illustratefile(width, height, filename)
%   aligns the center of the box with the center of the
%   PostScript letter size page (4.25, 5.5).
%
%    8.5/2 = 4.25in = 306 PostScript Points
%     11/2 = 5.50in = 396 PostScript Points
%
\def\illustratefile#1#2#3{%
   \unhbox\psboxvoid%  demand horizontal mode
   \hbox to #1{%
     \hfil%
     \vbox to #2{%
       \vfil%
       \special{psfile=#3 hoffset=-306 voffset=-396}%
       \vfil}%
     \hfil}}

\endinput
