Path: 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 In article <2218@astroatc.UUCP> brown@astroatc.UUCP (Vidiot) writes: >In article <2214@astroatc.UUCP> ttl@astroatc.UUCP (Tony Laundrie) writes: >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" Which punts "M" 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\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" 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