[comp.text] Postscript in troff

charlie@mica.stat.washington.edu (Charlie Geyer) (09/24/89)

How does one tell troff to go to a specific point on the page?  The
man page for psdit in the TranScript package says that

   \!%PB
   \!   postscript
   \!   code
   \!   here
   \!PE
   \!.

inserts the PostScript with the origin of the coordinate system at
"ditroff's idea of the current position on the page,"  which it does.

Great!  So how do I specify "ditroff's idea of the current position
on the page?"  The few things I've tried all produce the same result:
the "current position" is right at the end of the last word typeset.

goodloe@b11.ingr.com (Tony Goodloe) (04/26/91)

Sorry for rehashing this issue, but we don't have articles going as far
as the imbedding postscript in troff issue. Of course I have a need for 
this info now. Can someone email this thread to me or else tell me how 
to imbed postsrcipt in troff? I am very apprciative of any help I can
get.

thanks
tony

npn@cbnewsl.att.com (nils-peter.nelson) (04/30/91)

In DWB 3.1, PostScript files of any kind can be included by:
	troff stuff
	.BP file.ps height width flags
	more troff stuff
Then
	troff -mpictures -mm file | dpost | lp
If file.ps is encapsulated PostScript, the BoundingBox
comments will be honored; otherwise, file.ps is assumed
to describe an 8 1/2 x 11 page which is scaled to fit.
The flags are for things like left-justify with text on
the right, center justify with text flow around, and
right justify. Also, rotation, captions and a few other
goodies. The Picasso drawing program, included with DWB 3.1,
is particularly good at creating encapsulated PostScript;
other packages may not put in the bounding box.

lee@sq.sq.com (Liam R. E. Quin) (05/04/91)

npn@cbnewsl.att.com (nils-peter.nelson) writes:
> In DWB 3.1, PostScript files of any kind can be included by:
>	.BP file.ps height width flags

Of course, most or all of the other versions of troff can also do this,
with more or less effort.  For example, with ditroff and Transcript you can
use psfig, and Elan's eroff and SoftQuad's sqtroff have built in requests
for including bitmaps and/or PostScript graphics.  So I think do the other
commercial versions of troff.

If you use the troff back-end that Chris Lewis wrote (`psroff'), you can even
do this with the old C/A/T troff, I understand.

I don't like the BP mnemonic for PostScript Illustration, by the way :-)  We
named a macro for including illustrations ILLUST, which seems to make more
sense -- BP sounds suspiciously like Begin Page to me.  Presumably by now the
ancient 2-character restriction on macro name length has been lifted in DWB?

> The Picasso drawing program, included with DWB 3.1,
> is particularly good at creating encapsulated PostScript;

In what way does Picasso do this better than other programs which do it,
that justifies `particlarly good'?  We've had no problem using a wide range
of PostScript files, including those from Adobe Illustrator and other Mac
programs, public-domain drawing programs and others.


Lee

[disclaimer: this article we posted by me, not by SoftQuad... etc etc...]

-- 
Liam Russell Quin, SoftQuad Inc., Toronto... 416 963 8337... lee@sq.com
	   `What one person finds valuable others do not even notice.
	    And they do not notice that they do not notice.'
-- Scott Kim, `Interdisciplinary Communication', in `The Art of [HCI] Design'