Article View: comp.lang.postscript
Article #673Re: Troff or pscat ?
From: Chris Lewis
Date: Mon, 10 Jul 1989 18:40
Date: Mon, 10 Jul 1989 18:40
47 lines
2576 bytes
2576 bytes
In article <2218@astroatc.UUCP> brown@astroatc.UUCP (Vidiot) writes:
>In article <2214@astroatc.UUCP> ttl@astroatc.UUCP (Tony Laundrie) writes:
><I guess I ought to elaborate...
><All I originally wanted to do was put a logo on our troff document covers.
><I did this by printing the word "ZSELOGO" in troff, then piping the pscat
><output through sed to replace the line containing "(ZSELOGO)" with my
><PostScript program to draw the logo.
(and ZSELOGO got broken into multiple shows.)
>Tony's problem is going to be solved in the future, as a purchase rec. has
>been turned in to get ditroff and transcript sources. Ditroff will allow
>Tony to import other pre-made figures alot easier.
The troff2 package that I sent to comp.sources.unix to come out within
the next week or two (I hope!!!!) has a particularly kludgey way to
do all this. (I sent it off to Rich a long time ago, and then had to
ask him to abort it because I made some rather silly mistakes. It's
been sent again. Yeah, I know, promises promises)
In troff documents, you can insert:
.tm "M<something>"
Which punts "M<something>" to stderr. "psroff" (the wrapper around troff
and the actual converters) merges stderr with stdout from troff (which
is the CAT codes). So, you get CAT codes sprinkled with "M<something>\0".
(or is it "\n"? I misremember). "M" is an unimplemented CAT code that
the back end recognizes to be an extended opcode, scoops up the characters
to the end of the string, and executes it. I use the character following
the "M" to specify opcode.
This is how you get stock CAT troff to change typefaces in the backend.
Also supported are file inclusions and "transparent copy to backend output".
For example, inclusion of job-specific postscript is implemented by
something like:
.tm "MI<filename>"
Works reasonably well, except that troff errors (eg: MM messages etc.)
bugger everything up...
--
Chris Lewis, R.H. Lathwell & Associates: Elegant Communications Inc.
UUCP: {uunet!mnetor, utcsri!utzoo}!lsuc!eci386!clewis
Phone: (416)-595-5425
Technical Details
Message-ID:
<1989Jul10.184052.29925@eci386.uucp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!attcan!lsuc!eci386!clewisReferences:
<2209@astroatc.UUCP> <15900@vail.ICO.ISC.COM> <2214@astroatc.UUCP> <2218@astroatc.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!lsuc!eci386!clewis From: clewis@eci386.uucp (Chris Lewis) Newsgroups: comp.lang.postscript Subject: Re: Troff or pscat ? Message-ID: <1989Jul10.184052.29925@eci386.uucp> Date: 10 Jul 89 18:40:52 GMT References: <2209@astroatc.UUCP> <15900@vail.ICO.ISC.COM> <2214@astroatc.UUCP> <2218@astroatc.UUCP> Reply-To: clewis@eci386.UUCP (Chris Lewis) Distribution: na Organization: R. H. Lathwell Associates: Elegant Communications, Inc. Lines: 48