groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/01: Add "ms" footnote marker placement hook.


From: Keith Marshall
Subject: [groff] 01/01: Add "ms" footnote marker placement hook.
Date: Sat, 4 Sep 2021 16:39:59 -0400 (EDT)

keithmarshall pushed a commit to branch master
in repository groff.

commit db18a3f21fdd1fac88430c522f3f817cd3c9446a
Author: Keith Marshall <keith.d.marshall@ntlworld.com>
AuthorDate: Sat Sep 4 21:39:04 2021 +0100

    Add "ms" footnote marker placement hook.
---
 ChangeLog   | 7 +++++++
 tmac/s.tmac | 8 ++++++++
 2 files changed, 15 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 9f37163..3a3f281 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-09-04  Keith Marshall  <keith.d.marshall@ntlworld.com>
+
+       Add "ms" footnote marker placement hook.
+
+       * tmac/s.tmac (FS-MARK): New macro; define as no-op, by default.
+       (@FS): Invoke FS-MARK as first action, allowing caller to "hook" it.
+
 2021-09-04  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/roff/troff/env.cpp (distribute_space): Refactor slightly.
diff --git a/tmac/s.tmac b/tmac/s.tmac
index 0152739..5ebc504 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -700,13 +700,21 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .ds * \E*[fn@mark-start]\En+[fn*text-num]\E*[fn@mark-end]
 ..
 .\" normal FS
+.\" FS-MARK is a user definable hook, which may be used to perform
+.\" any set-up actions, (e.g. planting an HREF link as the footnote
+.\" mark, in the document text); passed the same arguments as have
+.\" been passed to FS itself, unless redefined, it is a no-op.
 .de @FS
+.FS-MARK \\$@
 .ie \\n[.$] .fn*do-FS "\\$1" no
 .el \{\
 .      ie \\n[fn*text-num]>\\n[fn*note-num] .fn*do-FS \\n+[fn*note-num]
 .      el .fn*do-FS
 .\}
 ..
+.\" Default no-op fallback for FS-MARK
+.de FS-MARK
+..
 .\" Second argument of 'no' means don't embellish the first argument.
 .de fn*do-FS
 .if \\n[fn*open] .@error-recover nested .FS



reply via email to

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