How to put comments in nroff/troff s - (nf)
Larry West
west at sdcsla.UUCP
Tue Aug 14 17:31:33 AEST 1984
Another oft-used (and documented) way to make block-comments in
nroff/troff is by using the ".ig" (ignore) macro. This can be
used as below [indented by one tab for this example only, of
course]:
.ig
This is a block comment in nroff/troff. See
section 20 (miscellaneous) of the reference manual
(``Nroff/Troff User's Manual'', by Ossanna of Bell).
Nothing in here should have any effect upon
the document. I indent [again] out of personal
preference. Terminate with double-dot:
..
or:
.ig EE
You can specify that you want to end the comment
with something other than "..", as in:
.EE
I don't know whether there is a conflict in naming here -- e.g.,
whether a ".EE" macro would be lost in the previous example. I'd
assume the worst.
And, as mentioned before, there is this form of block-comments:
' \" The use of the "'" rather than "." is
' \" discussed in the reference manual, section 1.1.
' \" This is really a case of ignoring an unknown
' \" macro -- the``\"'' comments-out the remainder
' \" of the line, guaranteeing non-recognition.
It is often dangerous to use the ``\"'' comment on a real line --
in particular, using it on the same line as a ".." will cause problems.
For example, don't end a macro like this:
.de FU
'bp
Man Chew?
.. \" end of "FU" <<-- won't work!
-- Larry West, UC San Diego, Institute for Cognitive Science
-- decvax!ittvax!dcdwest!sdcsvax!sdcsla!west
-- ucbvax!sdcsvax!sdcsla!west
-- west at NPRDC
More information about the Comp.unix
mailing list