groff-commit
[Top][All Lists]
Advanced

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

[groff] 14/14: [man]: Compensate for grotty's hor rule overdraw.


From: G. Branden Robinson
Subject: [groff] 14/14: [man]: Compensate for grotty's hor rule overdraw.
Date: Fri, 29 Dec 2023 21:07:20 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 69b76e6348e8e67963451b20ba0941294c54f860
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Dec 29 19:55:16 2023 -0600

    [man]: Compensate for grotty's hor rule overdraw.
    
    * tmac/an.tmac (an-end): Horizontal rules in nroff mode _always_
      overdraw by one character cell; this is how grotty detects
      intersections with vertical rules at boundaries (see Savannah #62471).
      Unfortunately it has unhappy consequences when drawing a rule that
      extends to the right margin.  Compensate by drawing the rule between
      consecutively rendered man pages nominally one en shorter than the
      line length, which turns out to be exactly the line length.
---
 ChangeLog    | 11 +++++++++++
 tmac/an.tmac |  4 +++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 2a8fc8727..3aea5a8ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2023-12-29  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/an.tmac (an-end): Horizontal rules in nroff mode _always_
+       overdraw by one character cell; this is how grotty detects
+       intersections with vertical rules at boundaries (see Savannah
+       #62471).  Unfortunately it has unhappy consequences when drawing
+       a rule that extends to the right margin.  Compensate by drawing
+       the rule between consecutively rendered man pages nominally one
+       en shorter than the line length, which turns out to be exactly
+       the line length.
+
 2023-12-29  Deri James  <deri@chuzzlewit.myzen.co.uk>
 
        [gropdf]: Fix Savannah #65092 (rounded corners in hdtbl's
diff --git a/tmac/an.tmac b/tmac/an.tmac
index e49a24965..316d4abde 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -128,7 +128,9 @@
 .      pl +1v
 .      nf
 .      ti 0
-.      nop \D'l \\n[LL]u 0'
+.      nr an*rule-length (\\n[LL]u - 1n)
+.      nop \D'l \\n[an*rule-length]u 0'
+.      rr an*rule-length
 .      fi
 .    \}
 .  \}



reply via email to

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