[net.unix] How to put comments in nroff/troff s

jab@uokvax.UUCP (08/05/84)

#R:druny:-98000:uokvax:6100039:000:901
uokvax!jab    Aug  5 12:11:00 1984

/***** uokvax:net.unix / druny!neal /  4:40 pm  Aug  2, 1984 */
Ok, I give up!  I tried putting ".." at the begining of each line,
but that sometimes leaves bird droppings in my output.
I tried putting '\"' at the beginning of each line, but if I
do that for several lines in a row, a large blank area appears in the
output.

So how do you put a block comment in?
-Neal McBurnett, ihnp4!druny!neal, 303-538-4852
/* ---------- */
This is kinda sick, admittedly.

The \" tells nroff/troff to ignore everything up to the next
newline, but you end up with TWO newline characters in
the nroff/troff input stream after processing the comment.

You need to tell nroff/troff to ignore the fact that we just skipped
a line, which normally would generate a line break, by using
comments as shown below:
'\"	This is a commented line that doesn't generate a
'\"	line break on the output.

	Jeff Bowles
	Lisle, IL

johnl@haddock.UUCP (08/06/84)

Try this:

.ig zz
 nroff will ignore this
 all
 the
 way
 down to
 here
.zz

(That's .ig for ignore.)

John Levine, ima!johnl

west@sdcsla.UUCP (Larry West) (08/14/84)

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@NPRDC

jeff@ism780.UUCP (08/23/84)

#R:druny:-98000:ism780:20700005:000:136
ism780!jeff    Aug 21 18:26:00 1984

No, when you say
	    .ig EE
	    stuff you want ignored
	    .EE
	    This is included in the output

the .EE macro DOES get executed.

west@sdcsla.UUCP (Larry West) (08/25/84)

In article <384@ism780.UUCP> jeff@ism780.UUCP writes:
>No, when you say
>	    .ig EE
>	    stuff you want ignored
>	    .EE
>	    This is included in the output
>
>the .EE macro DOES get executed.

Quite true.   I neglected to check this, since I always use the
default (".ig" ... "..").

Also, note that if "EE" is a string, it will be interpolated.

	-- Larry West, UC San Diego, Institute for Cognitive Science
	-- decvax!ittvax!dcdwest!sdcsvax!sdcsla!west
	-- ucbvax!sdcsvax!sdcsla!west
	-- west@NPRDC