anne@timbuk.cray.com (Anne Chenette) (11/17/89)
I've had a weirdness happen with ditroff/PostScript. A user mistakenly left out the space when he wanted the '\ ' (backslash-space) escape sequence; the results were most unexpected. Can anyone explain what is happening? (I hope news doesn't eat my \ characters!) The following sequence in a ditroff source file: \s-1\%CRAY\ Y-MP\s+1, \s-1\%CRAY\X-MP\ EA\s+1, and \s-1\%CRAY\ X-MP\s+1 systems, generates the following PostScript code: 3369(CRAY)X 3621(Y-MP)X 11 s 3833(,)X 10 s > 3880(CRAY)X < Suspicious-looking > MP EA, and < code here 11 s 4135(-)X 10 s 1890 5418(CRAY)N 2142(X-MP)X 11 s 2379(systems,)X which causes the following message from PostScript: Error: undefined; OffendingCommand: MP Flushing: rest of job (to end-of-file) will be ignored What did I do??? Is \X a ditroff escape sequence? If so, how is it used? I'd like to include PostScript figures in a ditroff document; can \X (or anything else) be used to do it? How do I get back to ditroff once I "escape" to PostScript? Is any of this documented anywhere? By the by, I'm running SunOs 3.5 with DWB ditroff (version unknown). I don't have ditroff documentation, other than the ditroff(1) man page; and my troff bible (J. Ossana, RIP) does not list the escape sequence \X (backslash-X). Worse yet, I don't know PostScript (mea culpa!) I would be grateful for any and all information. Please send mail, if possible; our news feed is flakey. Thanks in advance, Anne Chenette anne@cray.com or ..!uunet!cray!com P.S. In case the ditroff output is important, here it is (for the relevant passage). The ditroff output ends shortly after this occurs (about 75 lines later). 76C58R58A58Y56 22Y56-27M76Ps11 53,ws10 > 47C58R58A58Ywx X MP EA, and < This also looks suspicious s11 h81Chy n104 0 H374 s10 V5418 h1516cC 58R58A58Y56 22X56-27M76Pws11 78s41y47s41t34e44m78s41,
ray@vantage.UUCP (Ray Liere) (11/21/89)
On our system, \X is a mechanism for sending something to the postprocessor -- it stands for "eXtended command". So I suppose your user has (inadvertently) passed the MP command on to postscript ... Ray Liere Vantage Consulting and Research Corporation voice: (503)657-7294 uucp: uunet!nwnexus!vantage!ray -or- hplabs!hpfcla!hpubvwa!hpupora!vantage!ray Internet: vantage!ray@nwnexus.WA.COM
jaap+@andrew.cmu.edu (Jaap Akkerhuis) (11/21/89)
Excerpts from netnews.comp.text: 16-Nov-89 Ditroff question: what does.. Anne Chenette@timbuk.cra (1924) > What did I do??? Is \X a ditroff escape sequence? Yes, it is an escape seuqence to push arbitrary stuff trough troff. To citate your messages, ``\X-MP\ EA\s+1, and \s-'' showed up as ``x X MP EA, and s1'' in troffs ouput. The ``-'' are interprated as the quotes just like in \h' ' constructs etc. > If so, how is it used? > I'd like to include PostScript figures in a ditroff document; can \X > (or anything else) be used to do it? How do I get back to ditroff once > I "escape" to PostScript? Is any of this documented anywhere? By the by, > I'm running SunOs 3.5 with DWB ditroff (version unknown). It is used to send arbitrary commands to the postprocessor of troff. And yes, since the commands are arbitrary, you can do nice PostScript tricks with it. As an example, see ``psfig'', the postscript preprocessor done by Trevor Darrell & Ned Batchelder. It is available by anonymous ftp from (I believe) upenn.edu or so. jaap