[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 10/23: [mm]: Add `Aumt` string.
From: |
G. Branden Robinson |
Subject: |
[groff] 10/23: [mm]: Add `Aumt` string. |
Date: |
Thu, 3 Oct 2024 07:22:31 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 92826b28e24ff418cd29a129db8a1d8e84250aa1
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Sep 27 13:34:58 2024 -0500
[mm]: Add `Aumt` string.
* contrib/mm/mm/0.MT: Support an `Aumt` string to suppress the
appearance of positional arguments to the `AU` macro in the document
heading used by memorandum types 0-3 and 6. By default, all such
arguments appear, except the second (author initials). For example, a
value of "3 4" more accurately reproduces London & Reiser's 1978 paper
describing the porting of Unix to the VAX-11/780.
(cov*suppress-au-fields): New macro interprets `Aumt` string, if
defined.
(cov*print-authors): Format `AU` arguments only if not suppressed.
* contrib/mm/groff_mm.7.man (Strings) <Aumt>: Document facility.
NEWS: Add item.
---
NEWS | 7 +++++++
contrib/mm/ChangeLog | 15 +++++++++++++++
contrib/mm/groff_mm.7.man | 17 +++++++++++++++++
contrib/mm/mm/0.MT | 38 ++++++++++++++++++++++++++++++++------
4 files changed, 71 insertions(+), 6 deletions(-)
diff --git a/NEWS b/NEWS
index a5a5c594c..99e9cb1fc 100644
--- a/NEWS
+++ b/NEWS
@@ -441,6 +441,13 @@ Macro packages
former `Limsp` register. "2" continues to be recognized and handled
as before, but prompts a warning; migrate your documents.
+* The m (mm) macro package now supports an `Aumt` string to suppress
+ the appearance of positional arguments to the `AU` macro in the
+ document heading used by memorandum types 0-3 and 6. By default, all
+ such arguments appear, except the second (author initials). For
+ example, a value of "3 4" more accurately reproduces London &
+ Reiser's 1978 paper describing the porting of Unix to the VAX-11/780.
+
* The m (mm) macro package now supports the `E` register as DWB mm did.
* The m (mm) macro package now supports AT&T/DWB mm's `Rg` string.
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 9dbd1bb37..261570579 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,18 @@
+2024-09-27 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mm/0.MT: Support an `Aumt` string to suppress the appearance
+ of positional arguments to the `AU` macro in the document
+ heading used by memorandum types 0-3 and 6. By default, all
+ such arguments appear, except the second (author initials). For
+ example, a value of "3 4" more accurately reproduces London &
+ Reiser's 1978 paper describing the porting of Unix to the
+ VAX-11/780.
+ (cov*suppress-au-fields): New macro interprets `Aumt` string, if
+ defined.
+ (cov*print-authors): Format `AU` arguments only if not
+ suppressed.
+ * groff_mm.7.man (Strings) <Aumt>: Document facility.
+
2024-09-27 G. Branden Robinson <g.branden.robinson@gmail.com>
* mm/0.MT (cov*print-authors): Fix code style nit: define
diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 5ecf2529d..b289e1ebc 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -4163,6 +4163,23 @@ call.
.
.
.TP
+.B Aumt
+lists
+space-separated indices of positional arguments to the
+.B AU
+macro that should be suppressed from appearing in the document heading
+on the first page of
+.B MT
+memorandum types 0\[en]3 and 6.
+.
+By default,
+it is undefined;
+all arguments are formatted
+except the second
+(author initials).
+.
+.
+.TP
.B BU
interpolates a bullet mark in
.B BL
diff --git a/contrib/mm/mm/0.MT b/contrib/mm/mm/0.MT
index ddece705c..bb6112317 100644
--- a/contrib/mm/mm/0.MT
+++ b/contrib/mm/mm/0.MT
@@ -83,6 +83,26 @@ http://savannah.gnu.org/bugs/?group=groff.
.in
..
.\"------------
+.\" mm changed what `AU` fields in printed at the top of memoranda over
+.\" time, from PWB to DWB 3.3 at least. groff mm defaults to formatting
+.\" all that are present, but supports an `Aumt` string enabling their
+.\" selective suppression by position.
+.nr cov*i 0 1
+.while \n+[cov*i]<=9 \{\
+. nr cov*fmt-au!\n[cov*i] 1
+.\}
+.rr cov*i
+.
+.de cov*suppress-au-fields
+.while \\n[.$] \{\
+. ie \B'\\$1' .nr cov*fmt-au!\\$1 0
+. el .tm 0.MT:\\$0: non-numeric 'Aumt' argument '\\$1'
+. shift
+.\}
+..
+.
+.if d Aumt .cov*suppress-au-fields \*[Aumt]
+.
.de cov@print-authors
.\" The following diagnostic might be unreachable.
.if !r cov*au .@error no authors defined; call AU before MT
@@ -113,12 +133,18 @@ http://savannah.gnu.org/bugs/?group=groff.
.while \\n+[cov*i]<=\\n[cov*au] \{\
. cov@print-au1 \\n[cov*i] 1
. if \\n[Au] \{\
-. cov@print-au1 \\n[cov*i] 4
-. cov@print-au2 \\n[cov*i] 3 6
-. cov@print-au1 \\n[cov*i] 5
-. cov@print-au1 \\n[cov*i] 7
-. cov@print-au1 \\n[cov*i] 8
-. cov@print-au1 \\n[cov*i] 9
+. if \\n[cov*fmt-au!4] .cov@print-au1 \\n[cov*i] 4
+. ie \\n[cov*fmt-au!3]&\\n[cov*fmt-au!6] \{\
+. cov@print-au2 \\n[cov*i] 3 6
+. \}
+. el \{\
+. if \\n[cov*fmt-au!3] .cov@print-au1 \\n[cov*i] 3
+. if \\n[cov*fmt-au!6] .cov@print-au1 \\n[cov*i] 6
+. \}
+. if \\n[cov*fmt-au!5] .cov@print-au1 \\n[cov*i] 5
+. if \\n[cov*fmt-au!6] .cov@print-au1 \\n[cov*i] 7
+. if \\n[cov*fmt-au!7] .cov@print-au1 \\n[cov*i] 8
+. if \\n[cov*fmt-au!8] .cov@print-au1 \\n[cov*i] 9
. \}
. if \\n[cov*i]<\\n[cov*au] .SP 1
.\}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 10/23: [mm]: Add `Aumt` string.,
G. Branden Robinson <=