groff-commit
[Top][All Lists]
Advanced

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

[groff] 20/30: [mm]: Make reference list more flexible.


From: G. Branden Robinson
Subject: [groff] 20/30: [mm]: Make reference list more flexible.
Date: Thu, 10 Oct 2024 20:18:13 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit bbc24d51d4704fd416385b2416dec441f10638dd
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Oct 10 01:30:21 2024 -0500

    [mm]: Make reference list more flexible.
    
    Make new `LB`-based approach to reference page work both with documents
    that use refer(1) to collect references and those that use only mm(7)'s
    own facilities.
    
    * contrib/mm/m.tmac (ref@start-print): Change `LB` list "type" argument
      from 1 (enumerated) to 0 (string-based).  This is because the
      reference marks are self-enumerating.  However, this loses their
      trailing dots, so update `LI` call to add them back in.
    
    * contrib/mm/refer-mm.tmac (ref*biblio-item-sfx): Define as empty,
      overriding "refer.tmac"'s default.  As shown above, our own
      infrastructure supplies the dot suffix now.
---
 contrib/mm/ChangeLog     | 14 ++++++++++++++
 contrib/mm/m.tmac        |  4 ++--
 contrib/mm/refer-mm.tmac |  2 ++
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index a93128cad..148d5c686 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,17 @@
+2024-10-10  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       Make new `LB`-based approach to reference page work both with
+       documents that use refer(1) to collect references and those that
+       use only mm(7)'s own facilities.
+
+       * m.tmac (ref@start-print): Change `LB` list "type" argument
+       from 1 (enumerated) to 0 (string-based).  This is because the
+       reference marks are self-enumerating.  However, this loses their
+       trailing dots, so update `LI` call to add them back in.
+       * refer-mm.tmac (ref*biblio-item-sfx): Define as empty,
+       overriding "refer.tmac"'s default.  As shown above, our own
+       infrastructure supplies the dot suffix now.
+
 2024-10-09  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * m.tmac (ref@start-print): Employ dummy character as "empty"
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index dc8352909..0d95d411d 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -3133,8 +3133,8 @@ exceeds depth of nested lists (\\n[li*lvl])
 .\"------------
 .de ref@start-print
 .di ref*div
-.LB \\n[Li] 0 1 1 \& 0\"
-.LI "\\$1"
+.LB \\n[Li] 0 1 0 \& 0\"
+.LI "\\$1."
 ..
 .\"------------
 .de ref@stop-print
diff --git a/contrib/mm/refer-mm.tmac b/contrib/mm/refer-mm.tmac
index ae3ec5922..2bfc90d8b 100644
--- a/contrib/mm/refer-mm.tmac
+++ b/contrib/mm/refer-mm.tmac
@@ -92,6 +92,8 @@
 \\..
 ..
 .
+.ds ref*biblio-item-sfx \" empty (ref@start-print supplies the dot)
+.
 .de ref*biblio-end-hook
 .  als ][ ref*][-second-pass
 .  rm ref*item-start-hook



reply via email to

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