groff-commit
[Top][All Lists]
Advanced

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

[groff] 15/28: [me]: Fix Savannah #62038.


From: G. Branden Robinson
Subject: [groff] 15/28: [me]: Fix Savannah #62038.
Date: Mon, 14 Feb 2022 01:46:58 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit cf01ac57e6a0787c1f3abaceffa62bf23c98412a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Feb 12 16:49:31 2022 +1100

    [me]: Fix Savannah #62038.
    
    * tmac/e.tmac (bx): Simulate boxed text support on nroff devices with
      ISO 6429 color escape sequences.  Add further fallback for non-groff
      formatters in nroff mode, bracketing the boxed argument with '|'
      glyphs.
    
    * doc/meref.me.in: Document it.
    
    Fixes <https://savannah.gnu.org/bugs/?62038>.
---
 ChangeLog       | 12 ++++++++++++
 doc/meref.me.in |  2 +-
 tmac/e.tmac     | 13 +++++++++++--
 3 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e15e5259..8e12e051 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2022-02-12  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [me]: Simulate boxed text support on nroff devices with ISO 6429
+       color escape sequences.
+
+       * tmac/e.tmac (bx): Do it.  Add further fallback for non-groff
+       formatters in nroff mode, bracketing the boxed argument with '|'
+       glyphs.
+       * doc/meref.me.in: Document it.
+
+       Fixes <https://savannah.gnu.org/bugs/?62038>.
+
 2022-02-12  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [me]: Rename registers `$v` -> `tv`, `$V` -> `dv`.
diff --git a/doc/meref.me.in b/doc/meref.me.in
index 3cc4d72d..e7c35bf8 100644
--- a/doc/meref.me.in
+++ b/doc/meref.me.in
@@ -1199,7 +1199,7 @@ in a box.
 should not be adjusted, hyphenated, or otherwise broken;
 .b .bx
 is reliable only when filling is disabled,
-works poorly in \*N mode,
+is simulated with ISO\~6429 color escape sequences in \*N mode,
 and is ignored by
 .i groff 's
 .b html
diff --git a/tmac/e.tmac b/tmac/e.tmac
index 2a6b0a65..b73680a0 100644
--- a/tmac/e.tmac
+++ b/tmac/e.tmac
@@ -1561,8 +1561,17 @@
 ..
 .
 .de bx                 \" *** enter boxed word
-.ie '\*(.T'html' \\$1\\$2
-.el \k~\(br\|\\$1\|\(br\l'|\\n~u\(rn'\l'|\\n~u\(ul'\^\\$2
+.ie t \
+\{\
+.      ie '\\*(.T'html' \\$1\\$2
+.      el \k~\(br\|\\$1\|\(br\l'|\\n~u\(rn'\l'|\\n~u\(ul'\^\\$2
+.\}
+.el \
+\{\
+.      ie \\n(.g .do nop \m[black]\M[white]\Z'\\$1'\h'\w'\\$1'u'\
+\m[]\M[]\\$2
+.      el |\\$1|\\$2
+.\}
 ..
 .
 .de sm                 \" *** print in smaller font



reply via email to

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