[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 17/36: [mm]: Restore support for argumentless `AU`.
From: |
G. Branden Robinson |
Subject: |
[groff] 17/36: [mm]: Restore support for argumentless `AU`. |
Date: |
Tue, 17 Jan 2023 20:45:12 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 79fb2fd0424063fbf36fd1143346f4154d439151
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Jan 16 12:23:50 2023 -0600
[mm]: Restore support for argumentless `AU`.
* contrib/mm/m.tmac (AU): Partially revert commit 4fd984adc9,
2021-07-17. `AU` can be called for the sole purpose of "closing" a
document title "opened" with `TL`.
* contrib/mm/groff_mm.7.man (Macros) <AU>: Update description.
---
contrib/mm/ChangeLog | 18 +++++++++---------
contrib/mm/groff_mm.7.man | 21 +++++++++++++--------
contrib/mm/m.tmac | 28 +++++++++++++---------------
3 files changed, 35 insertions(+), 32 deletions(-)
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index a9c933f53..45a7fc57b 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,10 @@
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (AU): Partially revert commit 4fd984adc9, 2021-07-17.
+ `AU` can be called for the sole purpose of "closing" a document
+ title "opened" with `TL`.
+ * groff_mm.7.man (Macros) <AU>: Update description.
+
2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
* m.tmac (TM): Warn if called without arguments.
@@ -54,10 +61,6 @@
* tests/MT-1-reports-all-TM-numbers.sh: Do it.
* mm.am (mm_TESTS): Run test.
-2023-01-03 G. Branden Robinson <g.branden.robinson@gmail.com>
-
- * groff_mm.7.man (AU): Fix error; an argument is mandatory.
-
2022-12-17 G. Branden Robinson <g.branden.robinson@gmail.com>
* m.tmac (let*mt-sign): Check strings populated by optional
@@ -250,11 +253,8 @@
Refactor author title handling.
- * m.tmac (AU): Emit error diagnostic and skip remainder of macro
- definition if called without arguments; this will keep people
- familiar with the ms package from getting incorrect and
- surprising output. Initialize `cov*at!` array element to zero
- for current author number (`AT` already updates it).
+ * m.tmac (AU): Initialize `cov*at!` array element to zero for
+ current author number (`AT` already updates it).
* mm/ms.cov (cov@print-authors): Enforce requirement documented
in groff_mm(7) that .AU is mandatory if .COVER is used. Emit
diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index eb2c454fd..37f7b9540 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -724,7 +724,8 @@ cover sheet style.
.
.
.TP
-.BI AU\~ name\~\c
+.BR AU \~\c
+.RI [ name\~\c
.RI [ initials\~\c
.RI [ loc\~\c
.RI [ dept\~\c
@@ -732,15 +733,15 @@ cover sheet style.
.RI [ room\~\c
.RI [ arg1\~\c
.RI [ arg2\~\c
-.RI [ arg3 ]]]]]]]]
-Author information.
-.
-Specifies the author of the memo or paper,
-and is printed on the cover sheet and in other similar places.
+.RI [ arg3 ]]]]]]]]]
+Specify author.
.
.B AU
-must not appear before
-.BR TL .
+terminates a document title being collected with
+.BR TL ,
+and can be called without arguments for that sole purpose.
+.
+Author information appears on cover sheets and similar places.
.
The author information can contain initials,
location,
@@ -749,6 +750,10 @@ telephone extension,
room number or name,
and up to three additional arguments.
.
+Repeat
+.B AU
+to identify multiple authors.
+.
.
.TP
.BI AV\ \fR[\fPname\ \fR[\fP1\fR]]\fP
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 9c7039885..e1dd8082e 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -3043,23 +3043,21 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%]
.ec
..
.\"-------------------
-.\" .AU name [initials [loc [dept [ext [room [arg [arg [arg]]]]]]]]
+.\" .AU [name [initials [loc [dept [ext [room [arg [arg [arg]]]]]]]]]
.de AU
.cov@title-end
-.ie !\\n[.$] .@error AU: no arguments
-.el \{\
-. pg@disable-top-trap
-. nr cov*au +1
-. nr cov*at!\\n[cov*au] 0 \" no titles for this author yet
-. nr cov*i 0 1
-. ds cov*au!\\n[cov*au]!1
-. while \\n[.$]>=\\n+[cov*i] \{\
-. ds cov*au!\\n[cov*au]!\\n[cov*i] "\\$[\\n[cov*i]]
-. \}
-. if (\\n[.$]>=3)&(\w@\\$3@) \{\
-. if d cov*location-\\$3] \{\
-. ds cov*au!3!\\n[cov*au] \\*[cov*location-\\$3]
-. \}
+.if !\\n[.$] .return \" AU is being used only to end a TL.
+.pg@disable-top-trap
+.nr cov*au +1
+.nr cov*at!\\n[cov*au] 0 \" no titles for this author yet
+.nr cov*i 0 1
+.ds cov*au!\\n[cov*au]!1
+.while \\n[.$]>=\\n+[cov*i] \{\
+. ds cov*au!\\n[cov*au]!\\n[cov*i] "\\$[\\n[cov*i]]
+.\}
+.if (\\n[.$]>=3)&(\w@\\$3@) \{\
+. if d cov*location-\\$3] \{\
+. ds cov*au!3!\\n[cov*au] \\*[cov*location-\\$3]
. \}
.\}
..
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 17/36: [mm]: Restore support for argumentless `AU`.,
G. Branden Robinson <=