🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #5296

Re: including postscript files in troff files

#5296
From: Vidiot
Date: Tue, 09 Apr 1991 05:54
46 lines
2955 bytes
In article <5353@ns-mx.uiowa.edu> papalacharla@icaen.uiowa.edu (Paparao Palacharla) writes:
<Does anyone know how to include postscript files in troff files? If so
<how and where can I get the software.

You don't say which troff you are using.  If it is a troff text processor that
provides output for the C/A/T phototypesetter, then the answer is you can't.
Not easily anyway.  The old troff produces very specialized output that can't
contain any kind of special code that can be sent to the post processor that
converts C/A/T output to PostScript.

But, if you are using a post-processor, like the pscat program from the Adobe
TranScript package, you can put a special keyword into the text.  You can then
find that keyword in the PostScript output and manually edit in the PostScript.
The keyword is just some normal text that will never be in the document, some
unique word in caps will do.  Normal 10pt text is preferred, since that will
keep if from being kerned.  The complete PostScript line that contains the
keyword will be replaced with your PostScript data.  You must surround the
included text with the following:

% Modified PB procedure to place origin at upper left corner
/MB{save /psv exch def 6.0 -6.0 scale
  3 -16 translate 0 0 moveto}def
/PE{psv restore}def

This goes into the Adobe TranScript pscat.pro file, or you can add it right
before your text.  If you add it to the dictionary, you can easily use the
two procedures anywhere in the PostScript output.  Use the `MB' procedure
right before your inclusion and the `PE' after the inclusion.  NOTE: The MB
sets the origin to the upper left corner, so that any kind of paper will work.
If your included input uses the lower left corner, change the `-6.0 scale' to
`6.0 scale' and `0 moveto' to `-792 moveto'.

If you are using ditroff, then the Adobe TranScript program psdit can be used
to include PostScript files.  See the psdit man page for details.  If you are
not using Adobe TranScript, then I have no idea what your post-processor will
allow you to do.  You'll have to check your man pages.

To make all of this easier, get the groff text handling package.  It has
PostScript inclusion built in.

Needless to say, but I have included PostScript stuff into old troff and
Adobe pscat, ditroff with Adobe psdit and groff.
-- 
      harvard\     att!nicmad\          spool.cs.wisc.edu!astroatc!vidiot!brown
Vidiot  ucbvax!uwvax..........!astroatc!vidiot!brown
      rutgers/  decvax!nicmad/ INTERNET:vidiot!brown%astroatc@spool.cs.wisc.edu
Technical Details
Message-ID: <1595@vidiot.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwvax!astroatc!vidiot!brown
References: <5353@ns-mx.uiowa.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwvax!astroatc!vidiot!brown
From: brown@vidiot.UUCP (Vidiot)
Newsgroups: comp.lang.postscript
Subject: Re: including postscript files in troff files
Message-ID: <1595@vidiot.UUCP>
Date: 9 Apr 91 05:54:17 GMT
References: <5353@ns-mx.uiowa.edu>
Reply-To: brown@vidiot.UUCP (Vidiot)
Organization: Vidiot's Hangout
Lines: 46