groff-commit
[Top][All Lists]
Advanced

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

[groff] 03/03: Adapt to accommodate global XH and XN implementations.


From: Keith Marshall
Subject: [groff] 03/03: Adapt to accommodate global XH and XN implementations.
Date: Sun, 24 Oct 2021 16:59:44 -0400 (EDT)

keithmarshall pushed a commit to branch master
in repository groff.

commit dde4dc8a12cd0bc68ac0fd42151a934a7806c463
Author: Keith Marshall <keith.d.marshall@ntlworld.com>
AuthorDate: Sun Oct 24 21:54:22 2021 +0100

    Adapt to accommodate global XH and XN implementations.
    
    cf. <https://savannah.gnu.org/bugs/?58946#comment13>
    
    * spdf.tmac (XH-INIT, XN-INIT, XH-UPDATE-TOC): Delete definitions;
    the defaults, provided by s.tmac, are now sufficient.
    (XH-REPLACEMENT, XN-REPLACEMENT): Define these, rather than...
    (XH, XN): ...these, respectively.
---
 contrib/pdfmark/ChangeLog | 29 +++++++++++++++++++++++++++++
 contrib/pdfmark/spdf.tmac | 30 +++++++++++++++---------------
 2 files changed, 44 insertions(+), 15 deletions(-)

diff --git a/contrib/pdfmark/ChangeLog b/contrib/pdfmark/ChangeLog
index cafe0a0..ad9fb44 100644
--- a/contrib/pdfmark/ChangeLog
+++ b/contrib/pdfmark/ChangeLog
@@ -1,3 +1,32 @@
+2021-10-24  Keith Marshall  <keith.d.marshall@ntlworld.com>
+
+       Adapt to accommodate global XH and XN implementations.
+
+       cf. <https://savannah.gnu.org/bugs/?58946#comment13>
+
+       * spdf.tmac (XH-INIT, XN-INIT, XH-UPDATE-TOC): Delete definitions;
+       the defaults, provided by s.tmac, are now sufficient.
+       (XH-REPLACEMENT, XN-REPLACEMENT): Define these, rather than...
+       (XH, XN): ...these, respectively.
+
+2021-10-24  Keith Marshall  <keith.d.marshall@ntlworld.com>
+
+       [ms]: Provide global default XH and XN implementations.
+
+       cf. <https://savannah.gnu.org/bugs/?58946#comment13>
+
+       * tmac/s.tmac (XH-INIT, XN-INIT, XH-UPDATE-TOC)
+       (XH, XN, XH-REPLACEMENT, XN-REPLACEMENT): Implement them, and...
+       * tmac/groff_ms.7.man: ...document them.
+
+2021-10-24  Keith Marshall  <keith.d.marshall@ntlworld.com>
+
+       [ms]: Fix misleading NH macro indentation.
+
+       * tmac/s.tmac (@NH) [.T is html]: .if statement should exhibit same
+       indentation as preceding .DEVTAG-NH statement, but is overindented;
+       fix it.
+
 2021-10-02  Keith Marshall  <keith.d.marshall@ntlworld.com>
 
        Make a minor layout adjustment.
diff --git a/contrib/pdfmark/spdf.tmac b/contrib/pdfmark/spdf.tmac
index c590498..130d8bd 100644
--- a/contrib/pdfmark/spdf.tmac
+++ b/contrib/pdfmark/spdf.tmac
@@ -135,10 +135,14 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .\"                   TOC  entry is determined by the definition
 .\"                   of this macro.
 .\"
-.\" Both XH, and XN macros, share a common entry point.
-.\"
-.de XH als
-.als XN XH
+.\" Our replacements for both XH, and XN macros share a common entry
+.\" point; we map both to their respective replacement hooks, so that
+.\" we may continue to take advantage of setup logic in s.tmac.  When
+.\" these are eventually invoked, they will have been renamed so that
+.\" they replace XH, and XH respectively.
+.\"
+.de XH-REPLACEMENT als
+.als XN-REPLACEMENT XH-REPLACEMENT
 .\" FIXME: within s.tmac, the heading level established by the most
 .\" recent prior invocation of the NH macro is tracked by the "nh*hl"
 .\" private register; perhaps s.tmac could expose this more publicly,
@@ -158,22 +162,18 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 ..
 .aln .NH spdf:nh*hl
 .
-.\" The user is expected to furnish the XH-INIT, XH-UPDATE-TOC, and
-.\" XN-INIT handlers.  (Note that the XH-UPDATE-TOC hook serves both
-.\" XH and XN; there is no separate XN-UPDATE-TOC).  These stubs are
-.\" provided to avoid possible "undefined macro" warnings; each is
-.\" implemented as a no-op.
-.\"
-.de XH-INIT de
-.de XH-UPDATE-TOC de
-.de XN-INIT
-..
 .\" The common entry point for both XH, and XN, handles initialization,
 .\" and interpretation of any specified options, before handing over to
 .\" one of two distinct formatting helper macros, which are specific to
 .\" the XH, and XN implementations respectively.
 .\"
-.am XH \" and also XN
+.am XH-REPLACEMENT \" thus serving as implementation for both XH and XN
+.\"
+.\" The user is expected to furnish the XH-INIT, XH-UPDATE-TOC, and
+.\" XN-INIT handlers.  (Note that the XH-UPDATE-TOC hook serves both
+.\" XH and XN; there is no separate XN-UPDATE-TOC).  A suitable stub
+.\" for each is provided by s.tmac; we have no need to replace them.
+.\"
 .   \\$0-INIT
 .   rm spdf:refname
 .   als spdf:bm.define spdf:bm.basic



reply via email to

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