wsg@cbnewsk.att.com (wendy.grohol) (12/19/90)
I am wondering what the function of \N and \X are. I can't find specifics about them in any of my troff books or documentation but I've used them on occasion. For example, \N'161' in my troff documents produces an upside down exclamation point. \X'SetColor:red' causes the next character to be printed in that color on color printout or it uses shading on black and white printout. Thanks, Wendy Grohol E-mail: att!pruxk!wsg Internet: wsg@pruxk.att.com
npn@cbnewsl.att.com (nils-peter.nelson) (12/20/90)
And the question is from Bell Labs, no less! For every troff font there is a font description file (readable ascii in DWB 3.1, binary in older troffs). It contains the character name, width, descender/ascender flag and numeric code. Because many fonts have more than 96 characters, you run out of printable ascii names for the characters. For example, the English cuurency symbol does not have an ascii representation, but is code number 220 in the PostScript font file. \N'220' will thus print this symbol. (actually, \(ps does this as well in 3.1) \X'string' merely copies string to the ditroff output stream. It's up to the postprocessor to do something reasonable. The SetColor example would only make sense if the PostScript postprocessor (dpost) followed in the pipeline. The visual representation and numeric code for all printable PostScript characters is in the PostScript section of the DWB 3.1 documentation. \X is in section 10.7 of the DWB 3.1 Troff User's Manual. For possible values of 'string' you would have to read the entire Adobe PostScript Language Reference Manual.