gbranden pushed a commit to branch master
in repository groff.
commit 1e7688a7aa07a28ae1bdd2f489ae353a96787e5a
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Jan 1 03:59:15 2026 -0600
[mm]: Fix Savannah #67875 (1/2).
* contrib/mm/m.tmac: Put a two-vee margin between the footnote area and
page footers. New register `ft*margin-below` stores this measurement,
which initalizes to zero because a page does not always bear
footnotes.
(hd@set-page): Compute `pg*foot-trap` using it, and report this
computation at appropriate debugging level.
(FE): Set `ft*margin-below` to 2v.
Fixes <https://savannah.gnu.org/bugs/?67875>.
However this change is insufficient, as there's no mechanism for
reducing this `ft*margin-below` back to zero on a subsequent page that
lacks footnotes. See next commit.
---
contrib/mm/ChangeLog | 12 ++++++++++++
contrib/mm/m.tmac | 9 +++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index e1e77c27e..cd0317328 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,15 @@
+2026-01-01 G. Branden Robinson <[email protected]>
+
+ * m.tmac: Put a two-vee margin between the footnote area and
+ page footers. New register `ft*margin-below` stores this
+ measurement, which initalizes to zero because a page does not
+ always bear footnotes.
+ (hd@set-page): Compute `pg*foot-trap` using it, and report this
+ computation at appropriate debugging level.
+ (FE): Set `ft*margin-below` to 2v.
+
+ Fixes <https://savannah.gnu.org/bugs/?67875>.
+
2026-01-01 G. Branden Robinson <[email protected]>
* m.tmac (pg@header): Drop spurious quotation marks from
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 55d4a5ee6..0a4de64b7 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -1383,6 +1383,7 @@ numeric; got '\\$1'
.nr pg*extra-footer-size 0
.nr pg*extra-header-size 0
.nr ft*note-size 0
+.nr ft*margin-below 0
.nr pg*cur-column 0
.nr pg*cols-per-page 1
.nr pg*cur-po \n[@po]
@@ -1395,11 +1396,13 @@ numeric; got '\\$1'
.\" footer TRAPS: set, enable and disable
.de pg@set-new-trap
.nr pg*foot-trap \\n[@pl]u-(\\n[pg*block-size]u+\
-\\n[ft*note-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]u+\
+\\n[ft*note-size]u+\\n[ft*margin-below]u+\
+\\n[pg*foot-margin]u+\\n[pg*footer-size]u+\
\\n[pg*extra-footer-size]u)
.\"
.if \\n[D]>=6 .tm \\$0: pg*foot-trap=\\n[@pl]u-(\\n[pg*block-size]u+\
-\\n[ft*note-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]u+\
+\\n[ft*note-size]u+\\n[ft*margin-below]u+\
+\\n[pg*foot-margin]u+\\n[pg*footer-size]u+\
\\n[pg*extra-footer-size]u)=\\n[pg*foot-trap]u
.\"
.\" last-pos points to the position of the footer and bottom
@@ -1740,6 +1743,7 @@ numeric; got '\\$1'
.if \\n[D]>=5 .tm \\$0: end-of-input macro: shutting down
.if \\n[D]>=4 .tm End of document text
.nr pg*at-end-of-input 1
+.\" XXX: What about spilled footnotes?
.df@eot-print
.ref@eot-print
..
@@ -2098,6 +2102,7 @@ dn=\\n[dn]
. debug@emit ft*tmp-div
. debug@di
. nr ft*note-size +\\n[dn]
+. nr ft*margin-below 2v
.\}
.rm ft*tmp-div
.ev
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit