groff-commit
[Top][All Lists]
Advanced

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

[groff] 03/04: tmac/an-old.tmac: Strengthen user control of HY.


From: G. Branden Robinson
Subject: [groff] 03/04: tmac/an-old.tmac: Strengthen user control of HY.
Date: Fri, 21 Aug 2020 13:50:02 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 64d6351ec15b713d8bc9b4cb3ff5380d12b73159
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Aug 22 02:28:34 2020 +1000

    tmac/an-old.tmac: Strengthen user control of HY.
    
    * tmac/an-old.tmac (TH): Set hyphenation mode to user preference with
      each new page rendered, in case a hostile page meddled with '.hy' or
      '.nh'.
    
      (after .mso man.local): Relocate setting of default hyphenation mode
      here (insted of just before .mso man.local).  Eliminate conditional on
      \n[an-html]; this doesn't matter because grohtml(1) doesn't support
      hyphenation anyway.  If it does learn to hyphenate, we should treat it
      the same as other output devices in any case.  Add comment explaining
      why we fall back to different defaults depending on \n[cR].
---
 ChangeLog        | 13 +++++++++++++
 tmac/an-old.tmac | 20 ++++++++++----------
 2 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f822649..f200112 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2020-08-22  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       * tmac/an-old.tmac (TH): Set hyphenation mode to user preference
+       with each new page rendered, in case a hostile page meddled with
+       '.hy' or '.nh'.
+       (after .mso man.local): Relocate setting of default hyphenation
+       mode here (insted of just before .mso man.local).  Eliminate
+       conditional on \n[an-html]; this doesn't matter because
+       grohtml(1) doesn't support hyphenation anyway.  If it does learn
+       to hyphenate, we should treat it the same as other output
+       devices in any case.  Add comment explaining why we fall back to
+       different defaults depending on \n[cR].
+
+2020-08-22  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * tmac/an-old.tmac (TH): Set adjustment to user preference with
        each new page rendered, in case a hostile page meddled with
        '.ad' or '.na'.
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index 3a73810..3d9e6cd 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -163,6 +163,7 @@
 .
 .  \" Restore parameters that a previous man page might have messed up.
 .  ad \\*[AD]
+.  hy \\n[HY]
 .
 .\" We must select an integer indentation value for nroff;
 .\" see comment in an-do-tag.
@@ -658,16 +659,6 @@
 .ds lq \(lq\"
 .ds rq \(rq\"
 .
-.if !\n[an-html] \{\
-.  if !rHY \{\
-.    ie \n[cR] \
-.      nr HY 4
-.    el \
-.      nr HY 6
-.  \}
-.  hy \n[HY]
-.\}
-.
 .\" For UTF-8, map some characters conservatively for the sake
 .\" of easy cut and paste.
 .
@@ -694,6 +685,15 @@
 .if !r CT \
 .  nr CT 0
 .
+.\" Similarly for hyphenation mode.
+.if !r HY \{\
+.  \" No page breaks occur in continuous rendering.
+.  ie \n[cR] \
+.    nr HY 4
+.  el \
+.    nr HY 6
+.\}
+.
 .\" Set the default adjustment mode and heading font only if -d options
 .\" or man.local did not.
 .if !d AD \



reply via email to

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