anne@hall.cray.com (Anne Chenette) (07/15/89)
I am beginning to work with the -ms macros in troff. I've been a troff user for a long time, but have used only the -me and -man macros. Now that I'm trying to write my own heavy-duty macros, I find myself bewildered by these danged -ms macros. They seem to have many undocumented features and many, many nasty side effects. I am very frustrated by the following passage (from "Document Formatting on UNIX Using the -ms Macros", by Joel Kies, 1980): "There is a reason for caution in using nroff commands in a file also containing -ms macros. The macro package executes sequences of nroff commands on its own, in a manner invisible to users. By inserting your own nroff commands you run the risk of introducing errors. The most likely unintended result is simply for your nroff commands to be ignored, but in some cases the results can include fatal nroff errors and expensive, garbled typesetter output. : : Because it is not possible to document in a simple way which tricks like this work and which don't, it is necessary to make the following generalization. Adaptations of more sophisticated features of the nroff language to files being processed with -ms, while possible, are not recommended for new or casual users of the document formatting programs." I find this insulting. It seems the writer/programmer was too lazy to describe what the -ms macros are doing and how to get around the side effects. I would like more information - something a tad more descriptive than looking at /usr/lib/tmac/tmac.s. Why are there undescribed features? Why do the -ms macros have so many obscure side effects? Where can I find more complete documentation on -ms? (I already have Roddy's excellent book, which doesn't go far enough.) Finally, as I begin to write my own macros, I find I am constantly bumping into register names already defined in troff. Where can I find a list of troff's predefined number registers and internal macro names? (We have only a binary copy of troff at our site.) Many thanks, Anne Chenette anne@prolix.cray.com or ..!uunet!cray!anne P.S. Please mail replies if possible - our news feed is very, very flakey.