[comp.text] sample file with embedded postscript

wjh+@andrew.cmu.edu (Fred Hansen) (04/11/91)

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