[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] groff: inconsistent behavior of " to separate arguments

From: Ingo Schwarze
Subject: Re: [BUG] groff: inconsistent behavior of " to separate arguments
Date: Sun, 20 Mar 2022 12:59:38 +0100

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"
  .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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]