gbranden pushed a commit to branch master
in repository groff.
commit 94b8f1271b9f97c6ee2635a2a314c62bcbcd6346
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Jun 14 08:34:46 2024 -0500
[mm]: Make `VERBON` macro less noisy.
* contrib/mm/m.tmac (VERBON): Check for font availability before
switching.
Consider:
$ cat VERBON.mm
.P
This is an
.I mm
document.
.P
.VERBON
Here's some verbatim stuff.
.VERBOFF
.P
Back to Times (probably).
.P
.VERBON 0 0 HR
Here's some more verbatim stuff.
.VERBOFF
Fixes:
$ nroff -mm VERBON.mm
troff:VERBON.mm:6: warning: cannot select font 'CR'
troff:VERBON.mm:12: warning: cannot select font 'HR'
---
contrib/mm/ChangeLog | 4 ++++
contrib/mm/m.tmac | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index a21a72e2d..7d2219c64 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,7 @@
+2024-06-14 G. Branden Robinson <[email protected]>
+
+ * m.tmac (VERBON): Check for font availability before switching.
+
2024-06-14 G. Branden Robinson <[email protected]>
* examples/memorandum.mm: New file illustrates `MT` documents.
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 2a4d51eca..33ec848c0 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -756,8 +756,8 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%]
.misc@ev-keep misc*verb-ev
.nf
.if (0\\n[misc*verb]%16)/8 .nm \\*[Verbnm]
-.ie !'\\$3'' .ft \\$3
-.el .ft CR
+.ie !'\\$3'' .if F \\$3 .ft \\$3
+.el .if F CR .ft CR
.ie 0\\$2 \{\
. ss \\$2
. ps \\$2
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit