Why does man(7) have 3 paragraph macros for the same thing? (was: `\c`, mdoc(7), and man(7) extension macros)

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

 



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

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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux