Ken Mandelberg:

> It  seems  like  AU/AT  with  the MM macros is not
> working properly.
>
> Here is a simple test
>
>    .AU "John Smith"
>    .AT "CEO"
>    .MT 5
>    .P
>    testing
>    .FC
>    .SG
>    .br
>
> [...]
>
> So the AT title string never comes out, and  there
> is an extraneous "--"

Please,  check  if the attached patch has fixed your
problem.  Bear in mind, that I only did  symptomatic
treatment, and it still does not work correctly with
more than one author.

Anton
--- m.tmac      2012-01-29 01:40:29.781250000 +0400
+++ m1.tmac     2012-01-29 01:47:40.406250000 +0400
@@ -3288,31 +3288,54 @@
 .\}
 ..
 .\"------------------------
+.\" Helper macro: assign string $2 to string $1 with separator $3
+.de ASS
+.   if !d \\$1 \{\
+.      ds sep-\\$1
+.      ds \\$1
+.   \}
+.   if d \\$2 .as \\$1 \\*[sep-\\$1]\\*[\\$2]
+.   ds sep-\\$1 \\$3
+..
 .\" Memorandum signature
 .de let*mt-sign
 .df@print-float 3
-.ne \\n[cov*au]u*4v
+.di di-sgn
 .ie \\n[.$]>1 .nr let*k 1
 .el .nr let*k \\n[cov*au]
-.ds let*tmp \\*[cov*au!\\n[let*k]!3]-\\*[cov*au!\\n[let*k]!4]-
+.\" Concatenate attributes of the last author:
+.ASS let*tmp cov*au!\\n[let*k]!3 -
+.ASS let*tmp cov*au!\\n[let*k]!4 -
 .nr let*i 0 1
-.while \\n+[let*i]<=\\n[cov*au] \{\
-.      if \\n[let*i]>1 .as let*tmp /
-.      as let*tmp \\*[cov*au!\\n[let*k]!2]
-.\}
+.\" Collect authors' initials:
+.while \\n+[let*i]<=\\n[cov*au] .ASS let*tmp cov*au!\\n[let*i]!2 "/"
 .if !''\\$1' .as let*tmp -\\$1
+.nr i-old \\n[.i]u
 .in (u;\\n[.l]/2)
 .nf
 .nr let*i 0 1
+.\" Loop through authors:
 .while \\n+[let*i]<=\\n[cov*au] \{\
-.      SP 3v
-.      if \\n[let*i]=\\n[let*k] \{\
+.  SP 3v
+.  if \\n[let*i]=\\n[let*k] \{\
 \Z'\h'-(u;\\n[.l]/2)'\\*[let*tmp]'\c
-.      \}
+.  \}
 \\*[cov*au!\\n[let*i]!1]
+.\" Print author's titles, one per line:
+.  nr cov*j 0 1
+.  while \\n+[cov*j]<=9 \{\
+.     br
+.     if d cov*at!\\n[let*i]!\\n[cov*j] \\*[cov*at!\\n[let*i]!\\n[cov*j]]
+.  \}
 .\}
+.di
+.ne \\n[dn]u
+.in 0
+.di-sgn
+.ch di-sgn
 .fi
-.in
+.in \\n[i-old]u
+.rr i-old
 ..
 .\"------------------------
 .\" Approval signature

Reply via email to