[comp.text] Importing postscript in troff

brown@vidiot.UUCP (Vidiot) (03/17/90)

In article <413@wmt.UUCP> mist@wmt.UUCP (Michiel Steltman) writes:
<++ Who can help me on this one ++
<
<We print troff documents on postscript devices, on a lot of different
<machines in our network: SUN's, sequent, apollo, vax, and more. 
<Now I would like to include postscript (for non pic-pictures) etc. in a troff
<file, so that it flows uninterpreted into the same output. ( We use
<troff | pscat | lpr ... ). I realize we could patch the postscript directly
<into the pscat output, but I think there must be an easier way, using 
<the .so command of a file with some tricks...

The answer is NO, you can't do it from within troff.  You must have AT&T's
Documentor's Workbench 2.0+, or compatible.  The reason why you can't is
because the output is for the C/A/T phototypesetter, which is a binary type
code, non-ASCII.  It doesn't contain any features that allow codes to be
passed from troff to pscat.  The output of pscat must be edited directly
and the code installed.  Even then you have to be careful, as the scaling
is different and you MUST place your stuff in the right place or it will be
all messed up.  I know, I've been through this with a Star Trek program
guide that I post to the net.

Pscat just wasn't designed for PostScript inclusion, psdit was.
-- 
      harvard\     att!nicmad\         spool.cs.wisc.edu!astroatc!vidiot!brown
Vidiot  ucbvax!uwvax..........!astroatc!vidiot!brown
      rutgers/  decvax!nicmad/ INET:<@spool.cs.wisc.edu,@astroatc:brown@vidiot>

clewis@eci386.uucp (Chris Lewis) (03/21/90)

In article <277@vidiot.UUCP> brown@vidiot.UUCP (Vidiot) writes:
| In article <413@wmt.UUCP> mist@wmt.UUCP (Michiel Steltman) writes:
| <Now I would like to include postscript (for non pic-pictures) etc. in a troff
| <file, so that it flows uninterpreted into the same output. ( We use
| <troff | pscat | lpr ... ). I realize we could patch the postscript directly
| <into the pscat output, but I think there must be an easier way, using 
| <the .so command of a file with some tricks...
| 
| The answer is NO, you can't do it from within troff.  You must have AT&T's

You're right - not directly....

| Documentor's Workbench 2.0+, or compatible.  The reason why you can't is
| because the output is for the C/A/T phototypesetter, which is a binary type
| code, non-ASCII.  It doesn't contain any features that allow codes to be
| passed from troff to pscat.

Unless you're using psroff instead of pscat.  Amongst other things, psroff
is able to include arbitrary text in the printer stream, requested by
directives in CAT troff's input files.  Psroff also uses this to emulate
".fp" commands and a few other things.  If pscat supports ".fp", it may also
support some sort of file inclusion.  Psroff release 2 (real soon now),
supports ".sy" (sort of) and a few other normally only ditroff goodies.

However, with psroff as currently incarnated, the Postscript must know
where it's supposed to go.

Here's a hint on how psroff does things - cause troff to merge its
stderr with stdout, ala:
	(troff -t arguments 2>&1) | troff2ps
And use
	.tm M<a line of ascii>
"M" is a unallocated CAT code, and is used by troff2ps to disambiguate
a stream of binary CAT codes from a newline terminated ASCII line which
is interpreted by troff2ps.  Ala:
	.tm MF1PA
M: special directive following
F: change fonts
1: on position 1, mount font PA

Or, in the original request:
	.tm MI<your postscript file>

[It's fun to toot my own horn ;-)]
-- 
Chris Lewis, Elegant Communications Inc, {uunet!attcan,utzoo}!lsuc!eci386!clewis
Ferret mailing list: eci386!ferret-list, psroff mailing list: eci386!psroff-list