🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #2102

Troff comments (was: Awf: Henry's Amazingly Workable Formatter)

#2102
From: Mark Brader
Date: Wed, 21 Nov 1990 18:31
35 lines
2057 bytes
Regarding the troff commenting convention, Larry Wall (lwall@jpl-devvax.
JPL.NASA.GOV) writes:

@  At the point that I developed the ''' habit, I had seen several documents
@  that used it in preference to .\", and I had the hope that it would become
@  an allowed alternative convention.  This has turned out not to be the case,

My colleague Liam R. E. Quin (lee@sq.sq.com) replies:

>  Probably because it is not, in fact, a comment, and troff has much too much
>  momentum to allow it to be one.  In particular, beware of things like
>  	''' \fB
>  where the font change to bold is _not_ commented out.

In fact, the font change does not happen, but for a subtle reason.
Troff sees the ''' as an invocation of a nonexistent macro, which
it ignores.  But macro arguments are read in copy mode, and the \f
escape sequence is not recognized in copy mode.  Thus, no font change.

On the other hand, something like

	''' Note the use of \n+x below

*will* cause an autoincrement of number register x, assuming that an
increment amount has been specified; and as Lee says, things like \}
also cause problems.  Not to mention the mess that would happen if
someone decided that '' was a good name for a temporary macro!

Followups directed to comp.text.
-- 
Mark Brader			    "This is Programming as a True Art Form,
SoftQuad Inc., Toronto		     where style is more important
utzoo!sq!msb, msb@sq.com	     than correctness..."     -- Pontus Hedman

This article is in the public domain.
Technical Details
Message-ID: <1990Nov21.183156.21873@sq.sq.com>
Path: arc1-ca.pugleaf.net!utzoo!sq!msb
References: <1990Nov15.170711.6778@zoo.toronto.edu> <10416@jpl-devvax.JPL.NASA.GOV> <1990Nov17.052158.10704@sq.sq.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.text,news.software.b,comp.lang.perl
Path: arc1-ca.pugleaf.net!utzoo!sq!msb
From: msb@sq.sq.com (Mark Brader)
Subject: Troff comments (was: Awf: Henry's Amazingly Workable Formatter)
Message-ID: <1990Nov21.183156.21873@sq.sq.com>
Followup-To: comp.text
Summary: ''' \fB does not cause font change but is still inadvisable
Organization: SoftQuad Inc., Toronto, Canada
References: <1990Nov15.170711.6778@zoo.toronto.edu> <10416@jpl-devvax.JPL.NASA.GOV> <1990Nov17.052158.10704@sq.sq.com>
Date: Wed, 21 Nov 90 18:31:56 GMT
Lines: 36