--- 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 address@hidden 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