All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: linux-man@vger.kernel.org, groff@gnu.org
Subject: Re: Why does man(7) have 3 paragraph macros for the same thing? (was: `\c`, mdoc(7), and man(7) extension macros)
Date: Thu, 26 Oct 2023 16:58:13 +0200	[thread overview]
Message-ID: <ZTp-hZTj7cmKMlXb@debian> (raw)
In-Reply-To: <20231026145140.qyl4lsfhp3644hmh@illithid>

[-- Attachment #1: Type: text/plain, Size: 2376 bytes --]

Hi Branden,

On Thu, Oct 26, 2023 at 09:51:40AM -0500, G. Branden Robinson wrote:
> At 2023-10-26T16:12:36+0200, Alejandro Colomar wrote:
> > Regarding PP, LP, and P, what's the history of them?  Why do we have
> > the 3?  I'm willing to reduce them to just one.
> 
> I invite Doug McIlroy to go on record, but my surmise is that they were
> introduced as crutches for people already familiar with ms(7).
> 
> Doug's original man(7) (1979) didn't have `P`.  But Unix System III
> added it in 1980, and 4.3BSD followed suit in 1986.  This information is
> in groff_man(7).

Was the original PP?

> 
> In ms(7), `LP` sets a paragraph that is left-aligned, and `PP` sets one
> with a first-line indentation.
> 
> In man(7), all (ordinary) paragraphs behave analogously to ms(7)'s `PP`.
> A first-line indentation is never used.
> 
> My opinion is that one should use `P` exclusively for a few reasons.
> 
> 1.  Its name is short and it is frequently used.  Huffman coding FTW.
> 2.  The existence of both `LP` and `PP` is difficult to rationalize to
>     anyone except a seasoned ms(7) author, of whom there are almost none
>     writing man(7) documents today.

Still, compatibility with ms(7) would make it slightly easier to
trasnfer learning from man(7) to ms(7), would one learn it.  I know many
other macros are incompatible in bad ways, but the less the better, no?

Cheers,
Alex

> 3.  It's been around long enough that everything supports it.  `LP`/`PP`
>     have no measurable advantage in this respect.  Anyone running early
>     BSD in 2023 has more interesting things to do than the composition
>     of legacy man pages.
> 
> Incidentally, mm(7) would have already had a `P` macro as well by 1979.
> Its call syntax is different (it interprets arguments; ms(7)'s and
> man(7)'s "plain" paragraphing macros do not).  Maybe this, and/or some
> friction between Bell Labs Research and the constantly reconfiguring
> series of departments dedicated to deriving revenue from Unix (and
> troff) commercially accounts for man(7)'s omission of it.
> 
> Nowadays, we can be confident that no loon is going to do something
> crazy with mm's `P` macro such that it would trip up man(7) writers.
> 
> <an evil grin spreads slowly across my face>
> 
> Regards,
> Branden



-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-10-26 14:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25 18:54 [PATCH 1/2] man*/: srcfix G. Branden Robinson
2023-10-25 19:38 ` Alejandro Colomar
2023-10-26 12:58   ` `\c`, mdoc(7), and man(7) extension macros (was: [PATCH 1/2] man*/: srcfix) G. Branden Robinson
2023-10-26 14:12     ` Alejandro Colomar
2023-10-26 14:51       ` Why does man(7) have 3 paragraph macros for the same thing? (was: `\c`, mdoc(7), and man(7) extension macros) G. Branden Robinson
2023-10-26 14:58         ` Alejandro Colomar [this message]
2023-10-26 15:28           ` G. Branden Robinson
2023-10-26 17:52             ` Why does man(7) have 3 paragraph macros for the same thing? Ingo Schwarze
2023-10-26 22:16               ` Alejandro Colomar
2023-10-26 22:02             ` Why does man(7) have 3 paragraph macros for the same thing? (was: `\c`, mdoc(7), and man(7) extension macros) Alejandro Colomar
2023-10-26 16:09         ` G. Branden Robinson
2023-10-26 21:59           ` Alejandro Colomar
2023-10-28 13:21       ` `\c`, mdoc(7), and man(7) extension macros (was: [PATCH 1/2] man*/: srcfix) G. Branden Robinson
2023-10-28 16:30         ` Alejandro Colomar
2023-10-26 23:27     ` Ingo Schwarze
2023-10-27  0:51       ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZTp-hZTj7cmKMlXb@debian \
    --to=alx@kernel.org \
    --cc=g.branden.robinson@gmail.com \
    --cc=groff@gnu.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.