[comp.lang.postscript] Embedding post-script images in troff text

cracraft@venera.isi.edu (Stuart Cracraft) (01/23/88)

Is there a way to embed post-script images in troff text?
For example, the postscript language could be used to produce
a fancy table or image, and this postscript language and/or
image could somehow be inserted in the middle of a troff
document.

	Stuart

ssl@ticnj.UUCP (Steven S. Levinn) (02/09/88)

In article <901@ora.UUCP>, tim@ora.UUCP writes:
> In article <4594@venera.isi.edu>, cracraft@venera.isi.edu (Stuart Cracraft) writes:
> > Is there a way to embed post-script images in troff text?
> > For example, the PostScript language could be used to produce
> > a fancy table or image, and this PostScript language and/or
> > image could somehow be inserted in the middle of a troff
> > document.
> > 
> It depends on the postprocessor you're using.  To include
> PostScript code in troff is simply a matter of using any one
> of a number of troff mechanisms.  For example, there's so
> called "transparent output":
> 
>   \! PostScript code here
> 
  Much more info about troff macros was included in the article

My question to those of you out there that use psfig and the psfig macros with
troff:

How do you include uploaded pictures from the mac in your troff document?
I upload (clover-F output) and try to include the files using psfig macros.
I don't understand the mac Postscript (output from macdraw or a screen sweep
from macterm for example) enough to include the proper %%BoundingBox info.
I'm not sure it would work even if I did.
Any pictures I include seems to eliminate
(or at least not print) any output before the last picture.
If any of you have sucessfully included pictures from the mac in your
troff docs please give me a call or send mail. I will summarize
any info I get.

For handwritten postscript the psfig macros work just great.  They
scale, allocate the correct amount of space and correctly
work like any troff pre-processor.

Thanks,
Steve Levinn
201-747-4700
ihnp4!attunix!ticnj!ssl

jonab@CAM.UNISYS.COM (Jonathan P. Biggar) (02/17/88)

In article <262@ticnj.UUCP> ssl@ticnj.UUCP (Steven S. Levinn) writes:
>How do you include uploaded pictures from the mac in your troff document?
>I upload (clover-F output) and try to include the files using psfig macros.
>I don't understand the mac Postscript (output from macdraw or a screen sweep
>from macterm for example) enough to include the proper %%BoundingBox info.
>I'm not sure it would work even if I did.
>Any pictures I include seems to eliminate
>(or at least not print) any output before the last picture.
>If any of you have sucessfully included pictures from the mac in your
>troff docs please give me a call or send mail. I will summarize
>any info I get.
>
>For handwritten postscript the psfig macros work just great.  They
>scale, allocate the correct amount of space and correctly
>work like any troff pre-processor.

1) Get a copy of the Mac LaserPrep uploaded to your unix system using
   clover-K instead of clover-F.

2) Edit the LaserPrep file and make two changes:
   a) strip out the definitions of stretch and smooth that are
      defined using eexec.  I have not figured out how to modify the
      LaserPrep so that these can remain.  If your postscript printer
      already has the LaserPrep downloaded, then you will have no problem.
      Otherwise, you might have to turn off smoothing.

   b) find the definitions of "bigs" and "smalls".  They will be
      defined as an array of 9 entries, some of which are the word
      "lnop".  Change them so that all 9 entries are just "lnop".
      This removes the code in the LaserPrep that fiddles with the
      page size definitions and the default matrix.

   Also strip out the postscript for the figure you were printing when
   you used clover-K.

3) Include the LaserPrep file in your document via:

.F+
file LaserPrep global;
.F-

before the first figure.

Jon Biggar
jonab@cam.unisys.com