Path: utzoo!mnetor!uunet!oddjob!gargoyle!ihnp4!homxb!whuts!mtune!mtgzz!drutx!druhi!holder From: holder@druhi.ATT.COM (HolderML) Newsgroups: comp.text Subject: Re: nroff transparent mode Message-ID: <2709@druhi.ATT.COM> Date: 23 Feb 88 17:54:30 GMT References: <2694@druhi.ATT.COM> Distribution: comp Organization: AT&T, Denver, CO Lines: 48 In article <2694@druhi.ATT.COM>, holder@druhi.ATT.COM (HolderML) writes: > I'm trying to send some escape sequences through nroff (the DWB 2.0 version > running on System V.2 on Amdahl UTS) to generate some special characters > and to do some highlighting (shading) on a Xerox 9700 printer. The > > .DS > \!This is shaded text. > > \!\033\033\017This is shaded text.\033\033\016 > .DE > First, let me thank those who tried to help, either via mail or by posting a reply. Second, let me apologize for not noticing that our mailer here stripped out the embedded escape sequences I had placed in the message. (The first line of the display should have looked something like: \!^]^]^OThis is shaded text.^]^]^N where ^] is the ASCII escape character and ^O and ^N are the ASCII shift out/shift in characters.) This confused the issue quite a bit. The other line of the display would never have worked anyway, since nroff takes the \0 as a null. Some people pointed out that being in a display (diversion) caused nroff to handle things slightly differently, so I took the .DS/.DE away, and lo and behold: nothing changed. Nroff still ate the escape sequences. Now for the answer! It turns out the the DWB 2.0 nroff is supposed to eat escape sequences (even though that fact didn't show up in the documentation). DWB 2.0 nroff handles device specific control sequences via device specific tables that are read in at run time. (The one for the -TX97 option to nroff exists in /usr/lib/nterm/tab.X97 on our system.) All device specific control sequences are defined as nroff strings, and the user must use the appropriate string name to generate the appropriate action. For instance, the bullet character is the nroff string \(bu and is defined for the X97 device as ^]^]W (whereas for some other device the bullet character might be some other escape sequence, an asterisk or possibly even null). For the X97 device, there are strings \(ds and \(ls to darken and lighten shading. For other devices, those strings are undefined and hence null. I'm still at something of a loss as to why the escapes were being eaten while in transparent mode, but since I've found the way to do what I want, I'm not going to pursue it. Mike Holder AT&T Denver ..!ihnp4!druhi!holder