groff-commit
[Top][All Lists]
Advanced

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

[groff] 15/30: [refer]: Parameterize list itemizer suffix.


From: G. Branden Robinson
Subject: [groff] 15/30: [refer]: Parameterize list itemizer suffix.
Date: Thu, 10 Oct 2024 20:18:12 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 1f4057bd894bf785e00fc5fade900dd7c00da8c8
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Oct 10 00:51:54 2024 -0500

    [refer]: Parameterize list itemizer suffix.
    
    * tmac/refer.tmac (ref*biblio-item-sfx): Define new string (if not
      already defined) to specify trailing punctuation for a bibliographic
      entry list item.  The default is a dot.
    
      (ref*end-print): Interpolate the new string instead of a literal dot.
---
 ChangeLog       | 8 ++++++++
 tmac/refer.tmac | 9 ++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 93927035a..10460ee97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-10-10  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/refer.tmac (ref*biblio-item-sfx): Define new string (if
+       not already defined) to specify trailing punctuation for a
+       bibliographic entry list item.  The default is a dot.
+       (ref*end-print): Interpolate the new string instead of a literal
+       dot.
+
 2024-10-09  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/preproc/tbl/table.cpp (table::add_entry): Quote the
diff --git a/tmac/refer.tmac b/tmac/refer.tmac
index 8ca2f1635..34193a666 100644
--- a/tmac/refer.tmac
+++ b/tmac/refer.tmac
@@ -48,6 +48,8 @@
 .\"   ref*item-end-hook             -- stuff prepended to the ][ macro
 .\"   ref*biblio-start-hook         -- stuff appended to the ]< macro
 .\"   ref*biblio-end-hook           -- stuff appended to the ]> macro
+.\"   ref*biblio-item-sfx           -- stuff appended to list item marks
+.\"                                    in bibliography block
 .\"
 .\" The following strings must be defined:
 .\"
@@ -183,9 +185,14 @@
 ..
 .
 .
+.\" A macro package should set this to an empty string if it handles
+.\" suffixing the item enumerators itself in the listing.
+.if !d ref*biblio-item-sfx \
+.      ds ref*biblio-item-sfx .\"
+.
 .de ref*end-print
 .      ie d [F \
-.              ref*biblio-item-start "\\*([F."
+.              ref*biblio-item-start "\\*([F\\*[ref*biblio-item-sfx]"
 .      el \
 .              ref*biblio-item-start-nolabel
 .      nop \\*[ref*string]



reply via email to

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