VI/NROFF symbolics question

hapke at mcdurb.Urbana.Gould.COM hapke at mcdurb.Urbana.Gould.COM
Thu Jan 26 00:58:00 AEST 1989


In a recent (and good) article, guy at auspex.UUCP writes:

>        And now, the string "FO" is set to \*FO.

There's a small typo here;  the syntax for printing a two-character defined
string would be \*(FO.  A single-character string is printed with \*X.

>     However,
> you have to be careful to avoid using names also used by whatever macro
> package you're using; the macro package documentation *might* list all
> the names (or classes of names) it uses, but if it doesn't, you'll have
> to look it up in the source for the macro package....

The reason for this is that "request, macro, and string names share the same
name list"  (Ossanna, NROFF/TROFF User's Manual). This means that a string
define can overwrite a macro definition or even a standard nroff/troff command.
If you overwrite a basic command, like .ft or .if, chaos follows.  (Yes, I've
seen this happen.)

You don't have to look at the macro package to get information on names.
There's an obscure nroff/troff command, .pm, that will 'print macros.'  It
prints the names of all defined strings and macros to standard error.

Warren Hapke, Motorola MCD Urbana Design Center
  uunet!uiucuxc!mcdurb!hapke



More information about the Comp.unix.questions mailing list