🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #2696

sample file with embedded postscript

#2696
From: Fred Hansen
Date: Thu, 11 Apr 1991 14:20
76 lines
2297 bytes
In response to some questions, here is a troff source files that use the
postscript embedding macros I posted recently.  I put the ps macros from
my earlier message in /tmp/psmac, the file below in /tmp/pstest,  and
gave the command

	troff -Tpsc /tmp/pstest > /tmp/pstest.dvi

Notice that the inital %! is not needed.  That is done in PB.

If the postscript embedding macros are processed by troff with a printer
type other than -Tpsc (or -Tpostscript), it will print as an empty box
instead of the postscript you want.

Fred Hansen


---------------- cut here ----------------
.so /tmp/psmac
.nr IN 36p
.nr LT 432p
.nr PO 54p
.br
.ad b
'ft R
.nr PS 12
.ps \n(PS
.nr VS 14p
.vs \n(VSu
.nr EN 8n
.sp 0.5i
.nr DP 1
.ds Fn \fR
.ds HF R
.nr HS \n(.s
.ds FF R
.nr FS \n(.s
'ta 36p 72p 108p 144p 180p 216p 252p 288p 324p 360p 396p 432p 468p 504p
540p 576p 612p 648p 684p
.nh
this is a test with a raster 
'PB 9 10
'if  \n(zT  \{\
\!    9 troffadjust 10 neg translate
\!    /width 19 def  /height 21 def /xScale 0.5000 def /yScale 0.5000 def
\!       width xScale mul height yScale mul scale
\!       /picstr width 7 add 8 idiv string def
\!          width height 1
\!          [width    0    0    height neg    0    height]
\!          {currentfile picstr readhexstring pop}
\!       image
\!    00001f
\!    00001f
\!    00001f
\!    00001f
\!    1f0f1f
\!    1f0f1f
\!    1f0f1f
\!    1f0f1f
\!    1f0f1f
\!    1f0f1f
\!    1f0f1f
\!    1f0f1f
\!    1f0f1f
\!    1f0f1f
\!    1f0f1f
\!    1f0f1f
\!    1f0f1f
\!    1f0f1f
\!    00001f
\!    00001f
\!    00001f
\}
'PE 9 10
'ta 36p 72p 108p 144p 180p 216p 252p 288p 324p 360p 396p 432p 468p 504p
540p 576p 612p 648p 684p
embedded in it
Technical Details
Message-ID: <Ac172bG00VsPMB=kte@andrew.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!uwm.edu!bionet!agate!ucbvax!tut.cis.ohio-state.edu!sei.cmu.edu!fs7.ece.cmu.edu!o.gp.cs.cmu.edu!andrew.cmu.edu!wjh+

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!uwm.edu!bionet!agate!ucbvax!tut.cis.ohio-state.edu!sei.cmu.edu!fs7.ece.cmu.edu!o.gp.cs.cmu.edu!andrew.cmu.edu!wjh+
From: wjh+@andrew.cmu.edu (Fred Hansen)
Newsgroups: comp.text
Subject: sample file with embedded postscript
Message-ID: <Ac172bG00VsPMB=kte@andrew.cmu.edu>
Date: 11 Apr 91 14:20:23 GMT
Article-I.D.: andrew.Ac172bG00VsPMB=kte
Organization: Information Technology Center, Carnegie Mellon, Pittsburgh, PA
Lines: 76