[comp.text] Help with Postscript

hope@gatech.UUCP (06/16/87)

The 'dvi2ps' (TeX DVI->Postscript) utility supplied with our TeX stuff
includes a Postscript header file which is prepended to each converted
Postscript file.  The output on the Apple Laserwriter is shifted right
and down about 1/2 inch.  I'd like to change this, and am sure it's possible
by changing the abovementioned header file.  Since I don't know Postscript
I thought someone out in Netland can give me a hand.

The header file is too big to include here, but these are the (seemingly)
relevant parts:

------------------
	:
	:
                        % units are in "dots" (300/inch)
/Resolution 300 def
/Inch  {Resolution mul} def  % converts inches to internal units
/Mtrx 6 array def

% dvi2ps will output coordinates in the TeX system ([0,0] 1" down and in
% from top left, with y +ive downward).  The default PostScript system
% is [0,0] at bottom left, y +ive up.  The Many Matrix Machinations in
% the following code are an attempt to reconcile that. The intent is to
% specify the scaling as 1 and have only translations in the matrix to
% properly position the text.  Caution: the default device matrices are
% *not* the same in all PostScript devices; that should not matter in most 
% of the code below (except for lanscape mode -- in that, rotations of
% -90 degrees resulted in the the rotation matrix [ e 1 ]
%                                                 [ 1 e ]
% where the "e"s were almost exactly but not quite unlike zeros.

	:

/@letter
  { letter initmatrix
    72 Resolution div dup neg scale          % set scaling to 1.
    310 -3005 translate     % move origin to top (these are not exactly 1"
    Mtrx currentmatrix pop  % and -10" because margins aren't set exactly right)
  } def % note mode is like letter, except it uses less VM

	:

/@start         % - @start -            -- start everything
  { @letter                             % (there is not much to do)
  } def

------------------

I have the feeling it's somewhere in the @letter declaration.  If you have
any ideas, please reply via mail.

Thanks in advance...

-- 
Theodore Hope
School of Information & Computer Science
Georgia Institute of Technology, Atlanta GA 30332
Internet: hope@gatech.edu	uucp: ...!gatech!hope