groff-commit
[Top][All Lists]
Advanced

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

[groff] 05/49: [man]: Elevate "P" as canonical paragraph macro.


From: G. Branden Robinson
Subject: [groff] 05/49: [man]: Elevate "P" as canonical paragraph macro.
Date: Wed, 16 Jun 2021 19:53:14 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit cf49e0fe7fdbaff94e21ebdcd3380c3559c2525d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Jun 16 00:24:38 2021 +1000

    [man]: Elevate "P" as canonical paragraph macro.
    
    Unfairly and capriciously elevate "P" as the preferred paragraphing
    macro for the man(7) language.  This is slightly ahistorical; the
    original man macro package from 1979 in fact did not recognize the name
    "P" at all, but did support "LP" and "PP".
    
    However, "P" did show up in AT&T System III Unix (1980) and later in
    4.3BSD (1986).  I speculate that "LP" and "PP" were supported to
    accommodate the varying paragraphing preferences of those accustomed to
    the ms(7) macro package.  However, anyone familiar with that package
    knows that these two macros mean different things, and have differing
    indentation behavior, which man(7) does not simulate.  In that respect,
    "LP" and "PP" imply too much to ms veterans, and nothing useful at all
    to other man(7) users; the "L" and first "P" are superfluous.
    
    Further, ".P" is frequently typed, and per sound principles of Huffman
    coding, it should be short.  Thus do I hope to buy the complaisance of
    grognards with the cheap bribe of "less typing", a preoccupation whose
    star has not dimmed among Unix geeks in 50 years.
    
    * tmac/an-old.tmac (P): Define this is as the "canonical" paragraphing
      macro.
    
      (LP, PP): Make these aliases of P.
---
 ChangeLog               |  6 ++++++
 tmac/an-old.tmac        |  7 ++++---
 tmac/groff_man.7.man.in | 40 ++++++++++++++++++++--------------------
 3 files changed, 30 insertions(+), 23 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 82f4ddc..40ed532 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2021-06-16  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       * tmac/an-old.tmac (P): Define this as the "canonical"
+       paragraphing macro.
+       (LP, PP): Make these aliases of P.
+
+2021-06-16  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * src/roff/troff/input.cpp (spring_trap): Tighten lexical
        discipline; describe macro as "trap-called" rather than
        "trap-invoked".
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index 5146a84..6be0933 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -574,7 +574,7 @@
 ..
 .
 .\" Set an ordinary paragraph.
-.de1 LP
+.de1 P
 .  sp \\n[PD]u
 .  ps \\n[PS]u
 .  vs \\n[VS]u
@@ -584,8 +584,9 @@
 .  ns
 ..
 .
-.als PP LP
-.als P LP
+.\" Accommodate ms(7) paragraphing refugees.
+.als LP P
+.als PP P
 .
 .\" Set an indented paragraph.
 .\" .IP [marker[ indentation-amount]]
diff --git a/tmac/groff_man.7.man.in b/tmac/groff_man.7.man.in
index 31452dc..19f9fa5 100644
--- a/tmac/groff_man.7.man.in
+++ b/tmac/groff_man.7.man.in
@@ -477,7 +477,7 @@ their default values.
 Text on input lines after
 .I heading-text
 is set as an ordinary paragraph
-.RB ( .PP ).
+.RB ( .P ).
 .
 .
 .IP
@@ -518,7 +518,7 @@ Set
 .I subheading-text
 as a subsection heading indented between a section heading and an
 ordinary paragraph
-.RB ( .PP ).
+.RB ( .P ).
 .
 See subsection \(lqHorizontal and vertical spacing\(rq below for the
 indentation amount.
@@ -547,7 +547,7 @@ their default values.
 Text on input lines after
 .I subheading-text
 is set as an ordinary paragraph
-.RB ( .PP ).
+.RB ( .P ).
 .
 .
 .TP
@@ -642,7 +642,7 @@ move the left margin one level back.
 .\" ====================================================================
 .
 An ordinary paragraph
-.RB ( .PP )
+.RB ( .P )
 _ifstyle()dnl
 like this one
 _endif()dnl
@@ -688,11 +688,11 @@ see subsection \(lqFont style macros\(rq below.
 .
 .
 .TP
+.B .P
+.TQ
 .B .LP
 .TQ
 .B .PP
-.TQ
-.B .P
 Begin a new paragraph;
 these macros are synonymous.
 .
@@ -776,10 +776,10 @@ _ifstyle()dnl
 .
 .IP
 The descriptions of
+.BR .P ,
 .BR .LP ,
-.BR .PP ,
 and
-.B .P
+.B .PP
 above were written using
 .B .TP
 and
@@ -883,7 +883,7 @@ Begin synopsis.
 A new paragraph is begun at the left margin
 _ifstyle()dnl
 (like
-.B .PP
+.B .P
 and its aliases)
 _endif()dnl
 unless
@@ -1672,7 +1672,7 @@ or
 .BR .SH ,
 .BR .SS ,
 or
-.B .PP
+.B .P
 or its synonyms is called;
 these clear the indentation entirely.
 .
@@ -1689,7 +1689,7 @@ is called.
 .
 .PP
 The indentation amount exhibited by ordinary paragraphs set with
-.B .PP
+.B .P
 (and its synonyms)
 not within an
 .BR .RS / .RE
@@ -1762,7 +1762,7 @@ and deprecated
 .B .HP
 macros,
 and cancelled by
-.B .PP
+.B .P
 and its synonyms.
 .
 An extensive example follows.
@@ -1770,7 +1770,7 @@ An extensive example follows.
 .
 .PP
 This ordinary
-.RB ( .PP )
+.RB ( .P )
 paragraph is not in a relative inset nor does it possess an indentation.
 .
 .
@@ -1782,7 +1782,7 @@ moved the left margin)
 with
 .B .RS
 and started another block paragraph with
-.BR .PP .
+.BR .P .
 .
 .
 .TP
@@ -1830,7 +1830,7 @@ but both affect the text of the paragraph.
 .
 .PP
 This ordinary
-.RB ( .PP )
+.RB ( .P )
 paragraph resets the indentation,
 but the left margin is still inset.
 .
@@ -1854,7 +1854,7 @@ pair)
 has reset the left margin to the default.
 .
 This is an ordinary
-.B .PP
+.B .P
 paragraph.
 .
 .
@@ -1881,7 +1881,7 @@ The following macros break the output line and insert 
vertical space:
 .BR .SH ,
 .BR .SS ,
 .BR .TP ,
-.B .PP
+.B .P
 (and its synonyms),
 .BR .IP ,
 and the deprecated
@@ -3028,7 +3028,7 @@ and\~6 otherwise.
 .TP
 .BI \-rIN= standard-indent
 Set the amount of indentation used for ordinary paragraphs
-.RB ( .PP
+.RB ( .P
 and its synonyms)
 and the default indentation amount used by
 .BR .IP ,
@@ -3338,7 +3338,7 @@ that is,
 the position at which an
 .I ordinary
 paragraph
-.RB ( .PP
+.RB ( .P
 and its synonyms)
 will be set.
 .
@@ -3357,7 +3357,7 @@ or give
 .B .RS
 an indentation argument that is at least as much as the paragraph's
 indentation amount relative to an adjacent
-.B .PP
+.B .P
 paragraph.
 .
 See subsection \(lqHorizontal and vertical spacing\(rq above for the



reply via email to

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