groff-commit
[Top][All Lists]
Advanced

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

[groff] 06/10: [man]: Refactor: abbreviate less frequently.


From: G. Branden Robinson
Subject: [groff] 06/10: [man]: Refactor: abbreviate less frequently.
Date: Thu, 7 Apr 2022 19:03:10 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit be84cc1086c557f865f6ce8806b5bacf1ea51b7c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Apr 8 05:56:41 2022 +1000

    [man]: Refactor: abbreviate less frequently.
    
    * tmac/an.tmac: Refactor.  Abbreviate page title and inner
      footer only once per document instead of once per page.  Exception:
      the legacy macros `AT` and `UC` change the inner footer, so
      re-abbreviate it if they are called.
    
      (TH, AT, UC): Call abbreviation macros from here...
      (an-header, an-footer): ...instead of here.
---
 ChangeLog    |  9 +++++++++
 tmac/an.tmac | 12 ++++++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ebbb4dfe..5ee9995d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-04-08  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/an.tmac: Refactor.  Abbreviate page title and inner
+       footer only once per document instead of once per page.
+       Exception: the legacy macros `AT` and `UC` change the inner
+       footer, so re-abbreviate it if they are called.
+       (TH, AT, UC): Call abbreviation macros from here...
+       (an-header, an-footer): ...instead of here.
+
 2022-04-08  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/an.tmac: Refactor: initialize header/footer environment
diff --git a/tmac/an.tmac b/tmac/an.tmac
index 49ddfe9f..3d44ae67 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -315,6 +315,10 @@
 .  ps \\n[PS]u
 .  vs \\n[VS]u
 .  lt \\n[LT]u
+.  \" Abbreviate the page title and inner footer.
+.  \" If UC/AT, we'll need to call it again.
+.  an*abbreviate-page-title
+.  an*abbreviate-inner-footer
 .  ev
 .
 .  \" HTML gets the title without any abbreviation, since it's metadata.
@@ -354,6 +358,9 @@
 .    ie "\\$2"" .ds an-extra2 "System V\"
 .    el         .ds an-extra2 "System V Release \\$2\"
 .  \}
+.  ev an*env-header-and-footer
+.  an*abbreviate-inner-footer
+.  ev
 ..
 .
 .\" Designate a BSD Unix man page.
@@ -366,6 +373,9 @@
 .  if "\\$1"5" .ds an-extra2 "4.2 Berkeley Distribution\"
 .  if "\\$1"6" .ds an-extra2 "4.3 Berkeley Distribution\"
 .  if "\\$1"7" .ds an-extra2 "4.4 Berkeley Distribution\"
+.  ev an*env-header-and-footer
+.  an*abbreviate-inner-footer
+.  ev
 ..
 .
 .\" Restore tab stops to defaults.
@@ -532,7 +542,6 @@
 .de1 an-header
 .  if \\n[an-suppress-header-and-footer] .return
 .  ev an*env-header-and-footer
-.  an*abbreviate-page-title
 .  PT
 .  ev
 .  ns
@@ -559,7 +568,6 @@
 .      \}
 .    \}
 .  \}
-.  an*abbreviate-inner-footer
 .  BT
 .  rm an-outer-footer-text
 .  ev



reply via email to

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