gbranden pushed a commit to branch master
in repository groff.

commit 4f70bd8a1806f07a4d35b17903e60868c4269558
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Jan 3 19:43:28 2026 -0600

    groff_man*(7): Accommodate 65n-wide terminals.
    
    I preach the virtue of fitting one's man pages (as rendered) within the
    old AT&T troff nroff width of 65n to others (and it _is_ a good
    idea[1]), so I should practice it.
    
    * Describe `HP` macro more tersely in introductory table.
    
    * That table is still too fat, so "dedent" it (to use Eric Allman's
      term) by 3 ens if in nroff mode and the line length is less than 68
      ens.
    
    * Employ the same trick for the table presenting exhibits of poor idioms
      and our suggested replacements, this time if the line length is less
      than 72 ens, because this table's a chonk.  I couldn't see how to
      recast its material without risking loss of clarity, though.
    
    * Employ the same trick for the example of why one would suppress
      sentence-ending detection even in an `EX`/`EE` example.  This time,
      we're already using calling `RS` to inset, so give it an argument--but
      only if in nroff mode and the line length is less than 68 ens.
    
    Fixes:
    $ nroff -tz -rLL=65n -man ./build/tmac/groff_man_style.7
    ./build/tmac/groff_man_style.7:99: warning: table wider than line length 
minus indentation
    ./build/tmac/groff_man_style.7:4167: warning: table wider than line length 
minus indentation
    
    [1] see, e.g., https://baymard.com/blog/line-length-readability
    
        To be fair, even at 80n the line lengths actually presented to the
        reader by man(7) are shorter; nearly all material is indented.
---
 tmac/groff_man.7.man.in | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/tmac/groff_man.7.man.in b/tmac/groff_man.7.man.in
index b20a910dd..8b7fc23f7 100644
--- a/tmac/groff_man.7.man.in
+++ b/tmac/groff_man.7.man.in
@@ -163,6 +163,7 @@ typesetting system.
 _endif()dnl
 .P
 .if t .vs 11.75p \" begin hideous cheat for U.S. letter paper
+.if n .if \n[LL]<68n .RS -3n \" begin shameless cheat for slim terminals
 .TS
 l l l.
 Macro  Meaning Subsection
@@ -174,7 +175,7 @@ _
 \&.BR  Bold, roman alternating Font style macros
 \&.EE  Example end     Document structure macros
 \&.EX  Example begin   Document structure macros
-\&.HP  Begin paragraph with hanging indent     Paragraphing macros
+\&.HP  Begin hanging paragraph Paragraphing macros
 \&.I   Italic  Font style macros
 \&.IB  Italic, bold alternating        Font style macros
 \&.IP  Indented paragraph      Paragraphing macros
@@ -200,6 +201,7 @@ _
 \&.UR  URI start       Hyperlink macros
 \&.YS  Synopsis end    Synopsis macros
 .TE
+.if n .if \n[LL]<68n .RE \" end shameless cheat for slim terminals
 .if t .vs \" end hideous cheat for U.S. letter paper
 .
 .
@@ -4319,6 +4321,7 @@ often a shorter or clearer alternative is available.
 .
 .
 .IP
+.if n .if \n[LL]<72n .RS -4n \" begin shameless cheat for slim terminals
 .if t .ne 10v
 .if n .ne 16v \" account for horizontal rules
 .TS
@@ -4342,6 +4345,7 @@ _
 _
 \&.B one two \[dq]\[dq] three  .B one two three
 .TE
+.if n .if \n[LL]<68n .RE \" end shameless cheat for slim terminals
 .
 .
 .IP
@@ -4747,7 +4751,12 @@ escape sequence to interpolate the quotation mark 
strings.
 .
 .
 .P
-.RS
+.\" begin shameless cheat for slim terminals
+.ds Indent \" empty
+.if n .if \n[LL]<68n .ds Indent 2n
+.RS \*[Indent]
+.rm Indent
+.\" end shameless cheat for slim terminals
 .EX
 The command
 \&.RB \[rs]*(oq "while !\[rs]& git pull; do sleep 10; done" \[rs]*(cq

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to