Article View: comp.text
Article #3796Help with Postscript
From: hope
Date: Tue, 16 Jun 1987 20:31
Date: Tue, 16 Jun 1987 20:31
57 lines
2744 bytes
2744 bytes
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
Technical Details
Message-ID:
<15912@gatech.gatech.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!gatech!hopeShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!gatech!hope From: hope@gatech.UUCP Newsgroups: comp.text Subject: Help with Postscript Message-ID: <15912@gatech.gatech.edu> Date: Tue, 16-Jun-87 16:31:29 EDT Article-I.D.: gatech.15912 Posted: Tue Jun 16 16:31:29 1987 Date-Received: Thu, 18-Jun-87 01:37:40 EDT Organization: School of Information and Computer Science, Georgia Tech, Atlanta Lines: 57