Hi Ralph,

Ralph Corderoy wrote on Sun, Mar 20, 2022 at 10:06:14AM +0000:
> Ingo Schwarze wrote:

>> but the roff(7) manual in the mandoc package says this:
> ...
>>     Leaving out the terminating double quote character at the end of
>>     the line is discouraged.

> I think that's idiomatic and an early thing
> one learns about troff's ‘strings’

Well, to define *strings* (with .ds),
leaving it out is actually required:

   $ mandoc 
  .ds foo "bar"
  \*[foo]
  .ds foo "bar
  \*[foo]             <enter> <Ctrl-D>
  [...]
  bar" bar

Fortunately, defining strings is not encouraged in manual pages,
so this trap rarely ensnares manual page authors.

> compared to programming languages in order to read others' troff.
> 
> CSTR 54, §7.3 Arguments, ends with ‘A trailing double quote may be
> omitted’ without recommending against doing so.

I do not deny that the possibility to omit the trailing quote from
the last macro argument hasn't surprised Unix greybeards during
the last fourty years.

But since modern manual pages are mostly written and maintained
by people used to younger languages, i still think the following
advice is useful to avoid confusion of modern manual page maintainers:
If you quote a macro argument, always provide the closing quote,
even at the end of the input line where the roff language regards
it as optional.

Yours,
  Ingo

Reply via email to