xref: /plan9-contrib/sys/lib/tmac/tmac.cs (revision 219b2ee8daee37f4aad58d63f21287faa8e4ffdc)
1 '''\"					coversheet to match version 8/06/87
2 '''\"						from comp center 1.30 7/20/87
3 '''\" registers
4 '''\"	a - abstract continuation flag - 0 (no), >0 (yes)
5 '''\"	b - mercury selections counter
6 '''\"	c - distribution continuation flag - 0 (no), 1 (yes)
7 '''\"	d - flag for length calculation
8 '''\"	e - complete copy basic distribution length
9 '''\"	g - complete copy overflow distribution length
10 '''\"	h - cover sheet basic distribution length
11 '''\"	i - cover sheet overflow distribution length
12 '''\"	k - keyword flag - 0 (none), 1 (some) - reused as scratch
13 '''\"	l - number of vertical units per line - troff
14 '''\"	m - memorandum type flag - 1 TM, 2 IM, 3 TC
15 '''\"	n - document number counter
16 '''\"	o - title flag - 0 (no), 1 (yes - vertical size of title diversion)
17 '''\"	p - proprietary notice flag - 0 (none), 1 (default), 2(BR)
18 '''\"	r - security flag - 0 (no), 1 (yes)
19 '''\"	s - software flag - 0 (no), 1 (yes)
20 '''\"	t - mark title position
21 '''\"	u - author count
22 '''\"	q v w x y z- scratch - but remembered
23 '''\"	aa - ship to itds
24 '''\" strings
25 '''\"	a) b)- mercury info
26 '''\"	d) - date
27 '''\"	k) - keywords
28 '''\"	N1 - first document number
29 '''\"	p) q) r)- proprietary 1
30 '''\"	s) - time stamp string
31 '''\"	t) - memo type (TM, IM, TC)
32 '''\"	v) - document nos
33 '''\"	w) - filing case nos
34 '''\"	x) - work project nos
35 '''\"	e( - earlier document
36 '''\"	m( n( o( p(- authors 1-3 sig
37 '''\"	r( - responsible person
38 '''\"	s( - S software string
39 '''\"	t( - memo type ("for Technical Memorandum", etc.)
40 '''\"	x( - Mailing Label or DRAFT
41 '''\"	N2 N3- 2nd 3rd document number
42 '''\" 	Fi - up to 3 filing cases
43 '''\"	Xi - up to 3 work program numbers
44 '''\" diversions
45 '''\"	WB - abstract
46 '''\"	ZI - author info section
47 '''\"	ZC - complete copy addressee primary
48 '''\"	ZO - complete copy addressee overflow
49 '''\"	ZS - cover sheet addressee primary
50 '''\"	ZD - cover sheet addressee overflow
51 '''\"	ZN - document number info
52 '''\"	WT - title
53 '''\"
54 '''\" initialization
55 '''\"
56 '''\"		get ms if not loaded
57 .if !\n(PS .so /sys/lib/tmac/tmac.s
58 .	\" to foil ms
59 .if !'\*(d)'' \{\
60 .	tm You're trying to load the coversheet macros twice - havoc will result
61 .	tm I'm quitting to keep you from wasting paper
62 .	ex \}
63 .rn FE F6
64 .nr ST 0
65 .nr CS 1
66 .ch NP 16i
67 .ch FO 16i
68 .ch FX 16i
69 .ch BT 16i
70 .nr FM .01i
71 .nr 1T 1
72 .nr BE 1
73 .nr PI 5n
74 .if !\n(PD .nr PD 0.3v
75 .pl 11i
76 .de FT
77 .fp 1 H
78 .fp 2 HI
79 .fp 3 HB
80 .fp 4 HX
81 .ps 10
82 .vs 12
83 ..
84 .de FB
85 .ie !'\\*(TF'' .FP \\*(TF
86 .el .FP times
87 .ps 10
88 .vs 12
89 ..
90 .FT
91 .de FE
92 .F6
93 .nr F4 +\\n(FP
94 ..
95 .nr a 0 1
96 .nr b 0 1
97 .nr c 0
98 .nr d 0
99 .nr e 0
100 .nr g 0
101 .nr h 6
102 .nr i 0
103 .nr k 0
104 .nr m 0
105 .nr n 0 1
106 .nr o 0
107 .nr p 1
108 .nr q 0
109 .nr r 0
110 .nr s 0
111 .nr t 0
112 .nr u 0 1
113 .nr v 0
114 .nr w 0
115 .nr x 0
116 .nr y 0
117 .nr z 0
118 .nr dv 0
119 .if '\*(.T'aps' .nr dv 1
120 '''\"	initialize units per vertical space
121 .nr l 120
122 .nr lp 66
123 .nr np 2 1
124 .af np i
125 .nr tp 2 1
126 .nr tc 2
127 .af tc i
128 .nr la 0
129 .nr a1 0
130 .nr a2 0
131 .nr ar 0
132 .nr u! 1
133 .nr ud 1
134 .nr ra 1
135 .di ZI
136 .di
137 .di ZN
138 .di
139 .di ZC
140 .di
141 .di ZO
142 .di
143 .di ZS
144 .di
145 .di ZD
146 .di
147 '''\"initialize date string - keep for 1st pg of tm
148 .if \n(mo-0 .ds d) January
149 .if \n(mo-1 .ds d) February
150 .if \n(mo-2 .ds d) March
151 .if \n(mo-3 .ds d) April
152 .if \n(mo-4 .ds d) May
153 .if \n(mo-5 .ds d) June
154 .if \n(mo-6 .ds d) July
155 .if \n(mo-7 .ds d) August
156 .if \n(mo-8 .ds d) September
157 .if \n(mo-9 .ds d) October
158 .if \n(mo-10 .ds d) November
159 .if \n(mo-11 .ds d) December
160 .as d) " \n(dy, 19\n(yr
161 .ds DY \*(d)
162 '''			\" initialize strings
163 .ds m!
164 .ds m(
165 .ds n!
166 .ds n(
167 .ds o!
168 .ds o(
169 .ds x!
170 .ds y!
171 .ds z!
172 '''			\" initialize proprietary notice
173 .ds o) "AT&T \(em PROPRIETARY
174 .ds p) "Use pursuant to Company Instructions
175 .ds q)
176 .ds r)
177 '''			\" initialize trademark symbol
178 .ds MT \v'-0.5m'\s-4TM\s+4\v'0.5m'
179 .ds s) 0
180 '''			\"initialize csmacro version string
181 .ds ve MCSL (07/20/89)
182 ....in 0
183 '''\"
184 '''			\" macros to collect information
185 '''\"
186 .de DT 				\" macro for date
187 '''\"					store date if non-empty
188 .if !'\\$1'' .ds d) \\$1 \\$2 \\$3 \\$4
189 .ds DY \\$1 \\$2 \\$3 \\$4
190 ..
191 .de TI				\" macro for title -TI = mm(TL)
192 .br
193 .nr aa 0
194 .nr TV 1
195 .ie !'\\n(.F'<standard input>' \{\
196 .	sy timestamp \\n(.F>/tmp/tp\\n($$
197 .	so /tmp/tp\\n($$
198 .	sy rm /tmp/tp\\n($$
199 .	br \}			\" don't remove br - gets around troff bug
200 .ie '\\$1'' \{\
201 .	ie '\\n(.F'<standard input>' .tm Coversheet not sent to library - input is standard in
202 .	el .ie '\\n(.F'-' .tm Coversheet not sent to library - input is standard input
203 .	el \{\
204 .	nr aa 1
205 .	ds x( "Mailing Label \} \}
206 .el .ds x( \\s+2DRAFT\\s-2
207 .in 0
208 .fi
209 .ll 4.25i
210 '''\"					diversion for title ZT = mm(tI)
211 .di WT
212 ..
213 .de AH				\" macro for author info AH = mm(AU)
214 '''\"		name loc dept ext room mail_addr company
215 '''\"					don't count author unless non-empty
216 .br
217 .di
218 .if !'\\$1'' .nr u \\n+u
219 .nr AV \\nu
220 .if \\nu=1 \{\
221 .	br
222 '''\"					end title diversion on first author
223 .	di
224 .	nr o \\n(dn
225 .	ll
226 .	nf
227 .	ds d! \\$3
228 .	nr m2 \\$3/10 \}
229 .ta 0.3i 2.75i 4.0i 5.4i
230 .ie !'\\$6'' .ds r) (\\$6)
231 .el .ds r)
232 .br
233 .ds D\\nu \\$2 \\$3
234 .ds \\nuL \\$5, x\\$4
235 '''\"					append to author list ZI = mm(aV)
236 .da ZI
237 	\\$1 \\*(r)	\\$2 \\$5	\\$4	\\$7
238 .br
239 .da
240 '''\"					end append; info for signature lines
241 .AA \\nu "\\$1" \\$3 \\$2
242 .ta 0.5i 1.0i 1.5i 2.0i 2.5i
243 ..
244 .de AA
245 .ft 3
246 .di A\\$1
247 \\$2
248 .br
249 .di
250 .ft
251 .sy echo \\$2 >/tmp/tt\\n($$
252 .sy sed -f /sys/lib/tmac/name.sed /tmp/tt\\n($$ >/tmp/tx\\n($$
253 .so /tmp/tx\\n($$
254 .sy rm /tmp/tx\\n($$ /tmp/tt\\n($$
255 .if \\$1<2 .ds T1 \\*(T1-gre
256 .da G9
257 \\$4-\\$3-\\*(T1
258 .br
259 .da
260 .if !'\\*(d!'\\$3' \{\
261 .	nr u! \\n(u!+1
262 .	nr m3 \\$3/10
263 .	if !\\n(m2=\\n(m3 .nr ud \\n(ud+1 \}
264 .ie \\$1<4 \{\
265 .	as m! \\l'2.25i'
266 .	as m( 	\\$2 \}
267 .el .ie \\$1<7 \{\
268 .	as n! \\l'2.25i'
269 .	as n(	\\$2 \}
270 .el \{\
271 .	as o! \\l'2.25i'
272 .	as o(	\\$2 \}
273 ..
274 .de TO	\"begin list of im to people
275 .nr TO 1
276 .di 1T
277 ..
278 .de ET		\"end list of im to people & output pg
279 .di
280 .SR
281 ..
282 .de AP				\" at&t responsible person AP = mm(rP)
283 .br
284 .di
285 .if !'\\$1'' .ds r( \\$1
286 .rm AP
287 ..
288 .de SA				\" macro for abstract info SA = mm(AS)
289 .br
290 .ie \\n(.$ \{\
291 .ds a( \\$1
292 .if '\\$1'no' .ds a(\}
293 .el .ds a( ABSTRACT
294 .nr CS 0
295 .di
296 .fi
297 .nr LL 7.0i
298 .FB
299 .ft 1
300 .di WB				\" WB = mm(aS)
301 ..
302 .de SE 				\" macro for end of abstract info SE = mm(AE)
303 .br
304 .di
305 .nr la \\n(dn
306 .nr CS 1
307 .ll
308 .FT
309 .ft 1
310 .nf
311 ..
312 .de KW				\" macro for keyword info KW = mm(OK)
313 .ds k)
314 .if !'\\$1'' .as k) \\$1
315 .if !'\\$2'' .as k); \\$2
316 .if !'\\$3'' .as k); \\$3
317 .if !'\\$4'' .as k); \\$4
318 .if !'\\$5'' .as k); \\$5
319 .if !'\\$6'' .as k); \\$6
320 .if !'\\$7'' .as k); \\$7
321 .if !'\\$8'' .as k); \\$8
322 .if !'\\$9'' .as k); \\$9
323 '''\"					set k flag if we have some keywords
324 .ie !'\\*(k)'' .nr k 1
325 .el .nr k 0
326 ..
327 .de TY				\" macro for document type TY = mm(MT)
328 .if '\\$1'TM' \{\
329 .	nr m 1
330 .	ds t) TM
331 .	ds QF TECHNICAL MEMORANDUM
332 .	ds t( "for Technical Memorandum \}
333 .if '\\$1'IM' \{\
334 .	nr m 2
335 .	ds t) IM
336 .	ds QF INTERNAL MEMORANDUM
337 .	ds t( "for Internal Memorandum \}
338 .if '\\$1'TC' \{\
339 .	nr m 3
340 .	ds t) TC
341 .	ds QF TECHNICAL CORRESPONDENCE
342 .	ds t( "for Technical Correspondence \}
343 .ie '\\$2'y' .nr s 1
344 .el .nr s 0
345 ..
346 .de NU				\" macro for document number info NU = mm(dN fC wP)
347 .ie \\ns=1 .ds s( S
348 .el .ds s(
349 .ie \\n(wp=0 \{\
350 .	ie '\\$5'' .ds CX 311403-0101
351 .	el .ds CX \\$5
352 .	ds X1 \\*(CX
353 .	nr wp \\n(wp+1 \}
354 .el \{\
355 .	ds CX \\$5
356 .	if !'\\$5'' \{\
357 .		if \\n(wp=1 .ds X2 \\*(CX
358 .		if \\n(wp=2 .ds X3 \\*(CX
359 .		if \\n(wp=3 .ds X4 \\*(CX
360 .		if \\n(wp=4 .ds X5 \\*(CX
361 .		nr wp \\n(wp+1
362 .		ds x) s\} \}
363 .if !'\\$4'' \{\
364 .	ie !\\n(fc=0 \{\
365 .		if \\n(fc=1 .ds F2 \\$4
366 .		if \\n(fc=2 .ds F3 \\$4
367 .		if \\n(fc=3 .ds F4 \\$4
368 .		if \\n(fc=4 .ds F5 \\$4
369 .		ds w) s
370 .		nr fc \\n(fc+1 \}
371 .	el \{\
372 .		ds F1 \\$4
373 .		nr fc \\n(fc+1 \} \}
374 .ie !'\\$1'' \{\
375 .	ds NN \\$1-\\$2-\\$3\\*(t)\\*(s(
376 .	if \\nn=0 .ds N1 \\*(NN
377 .	if \\nn=1 \{\
378 .		ds v) s
379 .		ds N2 \\*(NN\}
380 .	if \\nn=2 .ds N3 \\*(NN
381 .	if \\nn=3 .ds N4 \\*(NN
382 .	if \\nn=4 .ds N5 \\*(NN
383 .	ie \\nn<4 .as x! \\l'2.25i'
384 .	el ie \\nn<7 .as y! \\l'2.25i'
385 .	el .as z! \\l'2.25i'
386 .	nr n \\n+n \}
387 .el .ds NN
388 .ta 0.8i 3.5i 5.75i
389 .br
390 .da ZN				\" ZN = mm(dM fC wO)
391 	\\*(NN	\\$4	\\*(CX
392 .br
393 .da
394 .ta 0.5i 1.0i 1.5i
395 ..
396 .de MY				\" macro for mercury selections MY = mm(mE)
397 .ds a)
398 .ds b)
399 .if '\\$1'y' \{\
400 .	as a) "	CHM - Chemistry and Materials
401 .	nr b \\n+b \}
402 .if '\\$2'y' \{\
403 .	as a) "	CMM - Communications
404 .	nr b \\n+b \}
405 .if '\\$3'y' \{\
406 .	as a) " 	CMP - Computing
407 .	nr b \\n+b
408 .	if \\nb=3 .rn a) b) \}
409 .if '\\$4'y' \{\
410 .	as a) "	ELC - Electronics
411 .	nr b \\n+b
412 .	if \\nb=3 .rn a) b) \}
413 .if '\\$5'y' \{\
414 .	as a) "	LFS - Life Sciences
415 .	nr b \\n+b
416 .	if \\nb=3 .rn a) b) \}
417 .if '\\$6'y' \{\
418 .	as a) "	MAS - Mathematics and Statistics
419 .	nr b \\n+b
420 .	if \\nb=3 .rn a) b) \}
421 .	if \\nb<6 \{\
422 .	if '\\$7'y' \{\
423 .		as a) "	PHY - Physics
424 .		nr b \\n+b
425 .		if \\nb=3 .rn a) b) \} \}
426 .	if \\nb<6 \{\
427 .	if '\\$8'y' \{\
428 .		as a) "	MAN - Manufacturing
429 .		nr b \\n+b \} \}
430 .if \\nb=3 .rn b) a)
431 ..
432 .de RL				\" at&t distribution ok RL = mm(rA or fA)
433 .if '\\$1'n' .nr ra 2
434 .rm RL
435 ..
436 .de ED				\" earlier document number ED = mm(eD)
437 .if !'\\$1'' .ds e( \\$1
438 .rm ED
439 ..
440 .de PR				\" macro for proprietary marking PR = mm(PM)
441 .if '\\$1'BP' .nr p 1
442 .if '\\$1'BR' \{\
443 .	nr p 2
444 .	ds o) "AT&T \(em PROPRIETARY (RESTRICTED)
445 .	ds p) "Solely for authorized persons having a need to know
446 .	ds q) "     pursuant to Company Instructions \}
447 .if '\\$1'0' .nr p 0
448 ..
449 .de GS				\" GS = mm(gS)
450 .nr r 1
451 ..
452 .de CI
453 ..
454 .de XE
455 '''\"				basic distribution leng-to be tailored-set e & h
456 .if \\nd=0 \{\
457 .	nr d 1
458 .	if \\nr=0 .nr e \\ne+2
459 .	if \\nu<=3 .nr e \\ne+3
460 .	if \\nu<=6 .nr e \\ne+3
461 .	if \\nu<=9 .nr e \\ne+3
462 .	if \\nn<=3 .nr e \\ne+2
463 .	if \\nn<=6 .nr e \\ne+2
464 .	if \\nn<=9 .nr e \\ne+2
465 .	if \\n(ra<=2 .nr e \\ne-3
466 .	nr e \\ne+27
467 .	nr h \\ne \}
468 ..
469 .de CO				\" macro for complete copy addressees CO = mm(cC)
470 .XE
471 .ta 2.0i
472 .nf
473 .br
474 .ie \\ne>0 \{\
475 .	da ZC				\" ZC = mm(cA)
476 .	if '\\$1'y' .so /sys/lib/tmac/complet.1127
477 .	dt \\ne OC \}
478 .el .da ZC
479 ..
480 .de OC				\" macro for complete copy overflow - OC = mm(cD)
481 .ta 2.0i
482 .br
483 .da
484 .da ZO				\" ZO = mm(cO)
485 .ie \\n(ar>0 .dt \\n(arv ZW
486 .el .dt 55 ZW
487 ..
488 .de ZW
489 .br
490 .da
491 .ie \\n(dn>0 .g (\\n(dn)/\\nl+4
492 .da CZ
493 ..
494 .de CV				\" macro for cover sheet only addresses CV = mm(cS)
495 .XE
496 .ta 2.0i
497 .nf
498 .br
499 .ie \\nh>0 \{\
500 .	da ZS				\" ZS = mm(dA)
501 .	if '\\$1'y' .so /sys/lib/tmac/cover.1127
502 .	dt \\nh OV \}
503 .el .da ZD
504 ..
505 .de OV				\" macro for cover sheet only overflow OV = mm(cT)
506 .ta 2.0i
507 .br
508 .da
509 .da ZD				\" ZD = mm(cO)
510 .ie \\n(ar>0 .dt \\n(arv WW
511 .el .dt 55 WW
512 ..
513 .de WW
514 .br
515 .da
516 .ie \\n(dn>0 .nr i (\\n(dn)/\\nl+4
517 .da DZ
518 ..
519 .de CE				\" ending all distribution diversions CE = mm(cE)
520 .br
521 .if "\\n(.z"ZC" \{\
522 .	nr g 0
523 .	rm OC \}
524 .if "\\n(.z"ZO" \{\
525 .	nr g -1
526 .	rm OC \}
527 .if "\\n(.z"CZ" \{\
528 .	nr g -2
529 .	rm OC \}
530 .if "\\n(.z"ZS" \{\
531 .	nr i 0
532 .	rm OV \}
533 .if "\\n(.z"ZD" \{\
534 .	nr i -1
535 .	rm OV \}
536 .if "\\n(.z"DZ" \{\
537 .	nr i -2
538 .	rm )V \}
539 .da
540 .if \\ng=-1 \{\
541 .	ie \\n(dn>0 .nr g (\\n(dn)/\\nl+4
542 .	el .nr g 0 \}
543 .if \\ni=-1 \{\
544 .	ie \\n(dn>0 .nr i (\\n(dn)/\\nl+4
545 .	el .nr i 0 \}
546 ..
547 '''\"
548 '''\" macros to help format document
549 '''\"
550 .de HD
551 .po .25i
552 .if "\\*(.T"aps" .tl '--''--'
553 .sp|0.2i
554 ..
555 .de FC				\" footer macro FC = mm(fO)
556 .pl 11.0i
557 'bp
558 ..
559 .de ST			\" macro for abstract overflow trap ST = mm(yY)
560 .ZB
561 .rm ST				\" ZB = mm(aT)
562 ..
563 .de ZB
564 .ch ST 16i			\" macro for abstract overflow trap ZB = mm(aT)
565 .if \\na>0 \{\
566 .	ft 2
567 .	ce
568 (continued)
569 .	ft 1 \}
570 .pl 11.0i
571 .nr a \\n+a
572 .rn ZB XX
573 'bp
574 .rn XX ZB
575 .wh -0.35i ZB
576 .HC				\" HC = mm(cH)
577 .HX				\" HX = mm(tH)
578 'sp 0.05i
579 .ce
580 .ft 3
581 Abstract (continued)
582 .ft 1
583 .in 0.2i
584 'sp 1
585 .FB
586 ..
587 .de TK				\" macro for thick lines TKK = mm(tK)
588 .ps 24
589 \l'7.5i'
590 .ps
591 ..
592 .de HX				\" macro for Title headings and text HX = mm(tH)
593 .TK
594 'sp 0.05i
595 '''\"					mark t - Title heading
596 .mk t
597 .ft 3
598 Title:
599 .ft
600 'sp|\\ntu
601 .in 0.7i
602 .WT
603 .in 0
604 .ta 0.5i
605 .nr q \\no/\\nl
606 .ie \\nq>2 'sp|\\ntu+\\nq
607 .el 'sp|\\ntu+2
608 .TK
609 .					\" m1 - mark end of title section - save
610 .mk m1
611 ..
612 .de HC				\" macro for continuation header HC = mm(cH)
613 .nr np \\n+(np
614 .nf
615 .in 0
616 .FT
617 .ft 3
618 .ta 4.80i
619 .nr tc \\n(tp
620 	\\*(N1\f2 (page \\n(np of \\n(tc)
621 .sp 0.1i
622 ..
623 .de DL				\" macro for distribution list headers DL = mm(dH)
624 .ft 3
625 .ta 1.0i 4.75i
626 	\\$1	\\$2
627 .sp 0.05i
628 .ft 1
629 .ta 0.5i 1.0i
630 ..
631 .de EJ				\" macro for ejecting continuation page EJ = mm(eP)
632 'bp
633 .wh 0 HD
634 '''\"				put out continuation page header & title section
635 .HC
636 .HX
637 ..
638 .de CP				\" macro for continuation page CP = mm(cP)
639 '''\"					calc vert. units for cc overflow (if any)
640 .ie \\nv<=\\n(.t .nr v 1
641 .el .nr v 0
642 .if \\nv=1 .if \\nw<=\\n(.t .nr v 2
643 .				\" check if cont page needs to be ejected
644 .in 0
645 .if \\nc=1 \{\
646 .				\" - if no abstract overflow
647 .	if \\na=0 .EJ
648 .	if \\na>0 \{\
649 .				\"or if abstract over but no room for list overfl
650 .		ie \\nv<2 .EJ
651 .				\" just tk line if abstract over & room for list
652 .		el .TK \}
653 .	FT
654 .	ie \\ne=0 \{\
655 .		if \\ng>4 .if \\ni>4 .DL "Complete Copy" "Cover Sheet Only"
656 .		if \\ng>4 .if !\\ni>4 .DL "Complete Copy" ""
657 .		if !\\ng>4 .if \\ni>4 .DL "" "Cover Sheet Only" \}
658 .	el \{\
659 .		if \\ng>4 .if \\ni>4 .DL "Complete Copy (continued)" "Cover Sheet Only (continued)"1
660 .		if \\ng>4 .if !\\ni>4 .DL "Complete Copy (continued)" ""
661 .		if !\\ng>4 .if \\ni>4 .DL "" "Cover Sheet Only (continued)" \}
662 .	mk z
663 .	nr q \\n(.t/\\nl
664 '''\"					put out complete copy list overflow
665 .	in 0.2i
666 .	ZO
667 .	in 0
668 .	mk x
669 .	sp|\\nzu
670 .	in 4i
671 '''\"					put out cover sheet list overflow
672 .	ZD
673 .	mk y
674 .	in 0
675 .	if \\nx-\\ny .sp|\\nxu
676 .	TK \}
677 ..
678 .de ZP					\"compute total pages and diversion lengths
679 '''\"				calculate vert. units for cc overflow (if any)
680 .ie \\ng>4 .nr v (\\ng)*\\nl
681 .el .nr v 0
682 '''\"					also for cs overflow (if any)
683 .ie \\ni>4 .nr w (\\ni)*\\nl
684 .el .nr w 0
685 .ie \\nv>\\nw .nr j \\nv
686 .el .nr j \\nw
687 .					\" set c=1 if either g or i >0
688 .if \\ng>4 .nr c 1
689 .if \\ni>4 .nr c 1
690 .					\" calculate total pages in job (default 2)
691 .					\" a1 - page 1 portion abstract (units)
692 .nr a1 \\nyu-\\nxu-1v
693 .ie \\n(la>\\n(a1 \{\
694 .					\" ar - remainder abstract (units)
695 .	nr ar \\n(la-\\n(a1
696 .	nr tp \\n+(tp
697 .					\" a2 - available continuation page space
698 .					\" m1 is mark after tk line after title
699 .					\" 2v for Abstract (continued) + one blank
700 .	nr a2 11.0i-\\n(m1-2v
701 .	ZZ \}
702 .el .if \\nc>0 .nr tp \\n+(tp
703 ..
704 .de ZZ				\" ZZ = mm(t1)
705 .ie \\n(ar>\\n(a2 \{\
706 .	nr ar \\n(ar-\\n(a2
707 .	nr tp \\n+(tp
708 .	ZZ \}
709 .el .if \\n(ar+\\nj>\\n(a2 .nr tp \\n+(tp
710 ..
711 '''\"
712 '''\" main macro to handle output of cover sheet
713 '''\"		mm(CS)
714 .de SC
715 .nr CS 0
716 .nr ST 1
717 .if \\nu=0 \{\
718 .	tm WARNING: author must be supplied \}
719 .if \\no=0 \{\
720 .	tm WARNING: document title must be supplied \}
721 .if \\nm=0 \{\
722 .	tm WARNING: memorandum type undefined or unknown \}
723 .if \\nm=1 .if \\nb=0 \{\
724 .	tm WARNING: technical memoranda must have at least one mercury class \}
725 .if \\nn=0 \{\
726 .	tm WARNING: document number must be supplied \}
727 .XE
728 .ll 7.5i
729 .ft 1
730 .if \\n(nl .bp
731 .in 0
732 .HD
733 '''\" the rs is to restore spacing - ditches big space at top
734 .rs
735 .sp1
736 .sp 0.05i
737 .nf
738 .ps 16
739 .ft 3
740 .ta 4.85i
741 .					\" put out page 1 heading
742 	Document Cover Sheet
743 .wh 0 HD
744 .sp 0.1i
745 .ta 0.25i 4.55i
746 .ds AZ \f(HBA\h'-.2m'T\h'-.15m'\s-3&\s0\h'-.15m'T\fP
747 .ie !'\*(Lb'' \{\
748 	\s36\(Lb\s0	\\*(t( \}
749 '''\"					put out memorandum type
750 .el \t\s36\(L1\s0\v'-.8'\\*(AZ\v'.8'\t\\*(t(
751 .ft
752 .ps 10
753 .HX
754 .sp 0.05i
755 .ft 3
756 .ie \\nu>1 .ds u) s
757 .el .ds u)
758 .ta 0.5i 2.75i 4.0i 4.7i
759 	Author\\*(u) (Computer Address)	Location	Ext.	Company (if other than AT&T-BL)
760 .ft
761 '''\"					output author info
762 .ZI
763 .if !'\\*(r('' \{\
764 .	ta 0.3i 2.6i
765 	\\*(r(	(Responsible AT&T-BL Person) \}
766 .TK
767 .sp 0.05i
768 .ft 3
769 .ta 1.0i 3.3i 5.55i
770 	Document No\\*(v).	Filing Case No\\*(w).	Project No\\*(x).
771 .ft
772 .sp 0.05i
773 '''\"					output document number
774 .ZN
775 .TK
776 '''\"					output keywords if they exist
777 .if \\nk>0 \{\
778 .	ft 3
779 Keywords:
780 .	ft
781 .	sp 0.05i
782 .	ti 0.2i
783 \\*(k)
784 .	TK \}
785 '''\"					output mercury info if it exists
786 .if \\nb>0 \{\
787 .	ft 3
788 MERCURY Announcement Bulletin Sections
789 .	ft
790 .	sp 0.05i
791 .	ta 0.6i 3.1i 5.6i
792 .	ps 8
793 .	if \\nb>3 \\*(b)
794 \\*(a)
795 .	ps
796 .	TK \}
797 .ft 3
798 Abstract
799 .ft
800 .mk x
801 .nr b1 \\nx/\\n(.v+1
802 .nr b2 (\\n(b1*\\n(.v)-\\nx
803 .sp \\n(b2u
804 .mk x
805 '''\" calculate position (19v includes 2v to print version at bottom of page)
806 .nr y \\n(lpv-19v
807 .if \\n(F4>0 .nr y \\ny-\\n(F4
808 .sp|\\nyu
809 .sp -1
810 .ZP
811 '''\"					handle abstract page 1 continuation
812 .ie \\n(la>\\n(a1 \{\
813 .	ce
814 .	ft2
815 (continued on page iii)
816 .	ft1
817 .	br \}
818 .el .sp1
819 .if \\n(F4>0 \{\
820 .	FA
821 .	FG \}
822 .TK
823 .ps 8
824 .vs 10
825 .nr qq \\$1+\\$2+\\n(tp
826 \f3Total Pages\f1 (including document cover sheet):  \\s+2\\n(qq\\s-2
827 .ie !'\\*(e('' \{\
828 Supersedes or amends document number \\*(e(. \}
829 .el .sp
830 .ps
831 .vs
832 .mk z
833 .sp .67i
834 '''\"					output proprietary notice if it exists
835 .if \\np>0 \{\
836 .ft 2
837 .ti (4i-\\w'\\*(o)'u)/2u
838 \\*(o)
839 .ft
840 .ti (4i-\\w'\\*(p)'u)/2u
841 \\*(p)
842 .ti (4i-\\w'\\*(q)'u)/2u
843 \\*(q) \}
844 .sp |\\nzu+11v
845 .ta 5.35i
846 \\s8\\*(ve\\s0
847 .ie !'\\*(s)'' \{\
848 \s8Timestamp: \\*(s)\s0	AT&T BELL LABORATORIES \}
849 .el \{\
850 	AT&T BELL LABORATORIES \}
851 .sp|\\nzu
852 .sp 1
853 .ft 3
854 .ti 5.25i
855 \\*(x(
856 .ft
857 .sp|\\nxu
858 .in 0.2i
859 .nf
860 '''\"					abstract
861 .if !\\n(la=\\n(a1 \{\
862 .	wh -0.25i ST \}
863 .pl \\nyu
864 .ta 0.5i 1.0i 1.5i 2.0i 2.5i
865 .FB
866 .ft 1
867 '''\"					output the abstract
868 .WB
869 .if \\n(la=\\n(a1 .sp-1
870 .rn ZB XX
871 .wh -0.25i FC
872 '''\"					output continuation page
873 .CP
874 'bp
875 .FT
876 .ft 1
877 .in 0
878 .wh 0 HD
879 .nf
880 .ft 3
881 .ta 5.00i
882 .nr tc \\n(tp
883 Initial Distribution Specifications	\\*(N1\f2 (page ii of \\n(tc)\f3
884 .ft 1
885 .TK
886 .if \\ne>0 \{\
887 .	DL "     Complete Copy" "     Cover Sheet Only"
888 .	mk z
889 '''\"					put out complete copy list
890 .	in 0.2i
891 .	ZC
892 .	in 0
893 .	if !\\ng=0 \{\
894 .		ft 2
895 .		ti 1.25i
896 (continued)
897 .		ft 1 \}
898 .	sp|\\nzu
899 .	in 4i
900 '''\"					put out cover sheet list
901 .	ZS
902 .	if !\\ni=0 \{\
903 .		ft 2
904 .		ti 4.75i
905 (continued)
906 .		ft 1 \}
907 .	in 0
908 '''\"					starter space value - then tailor
909 .	sp|5
910 .	sp \\ne
911 .	TK \}
912 .if \\nr=1 \{\
913 \f3Government Security Classified\f1
914 .	ft 1
915 .	sp -0.05i
916 .	TK \}
917 \f3Future AT&T Distribution by ITDS\f1
918 .ti 0.5i
919 .sp 0.05i
920 .ie \\n(ra=2 \{\
921 \f3DO NOT RELEASE\f1 to any AT&T employee without appropriate approval for each request. \}
922 .el \{\
923 \f3RELEASE\f1 to any AT&T employee (excluding contract employees). \}
924 .TK
925 '''\"					put out author signature section
926 .ft 3
927 Author Signature\\*(u)
928 .ft 1
929 .sp1
930 .ta 2.635i 5.25i
931 \\*(m!
932 .ta 0.25i 2.875i 5.5i
933 \\*(m(
934 .if \\nu>3 \{\
935 .	sp 0.1i
936 .	ta 2.635i 5.25i
937 \\*(n!
938 .	ta 0.25i 2.875i 5.5i
939 \\*(n( \}
940 .if \\nu>6 \{\
941 .	sp 0.1i
942 .	ta 2.635i 5.25i
943 \\*(o!
944 .	ta 0.25i 2.875i 5.5i
945 \\*(o( \}
946 .sp -0.1i
947 .TK
948 '''\"					output organizational approval section
949 .ie \\np>1 \{\
950 \f3Organizational Approval\f1  (Department Head approval \f3required\ff1 for \f2\\*(o)\f1.) \}
951 .el \{\
952 \f3Organizational Approval\f1  (Optional) \}
953 .sp 1
954 .ta 2.635i 5.25i
955 \\*(x!
956 .if \\nn>3 \{\
957 .	sp .1i
958 \\*(y! \}
959 .if \\nn>6 \{\
960 .	sp .1i
961 \\*(z! \}
962 .TK
963 '''\"					recipient section always output
964 .ft 3
965 For Use by Recipient of Cover Sheet:
966 .ft 1
967 .ps -3
968 .vs -4
969 .sp1
970 .mk z
971  Computing network users may order copies via the \f2library \-k\f1 command;
972   for information, type \f2man library\f1 after the UNIX prompt.
973 .sp1
974 .rn fo xx
975  Otherwise:
976   Enter PAN if AT&T-BL (or SS# if non-AT&T-BL). \l'1.5i'
977   Return this sheet to any ITDS location.
978 .sp|\\nzu
979 .in 4i
980 Internal Technical Document Service
981 .sp1
982 .ta 1i 2i 3i
983 ( ) AK 2H-28	( ) IH 7M-103	( ) DR 2F-19	( ) NW-ITDS
984 ( ) ALC 1B-102	( ) MV 1L-19	( ) INH 1C-114	( ) PR 5-2120
985 ( ) CB 30-2011	( ) WH 3E-204	( ) IW 2Z-156
986 ( ) HO 4F-112		( ) MT 3B-117
987 .in
988 .ps
989 .vs
990 .if \\n(aa \{\
991 .	sy pwd >/tmp/sx\\n($$
992 .	sy sed 's/^/cd /' /tmp/sx\\n($$ >/tmp/sc\\n($$
993 .	sy echo /sys/lib/tmac/sendcover \\n(.F \\n(qq >>/tmp/sc\\n($$
994 .	sy echo rm /tmp/sx\\n($$ /tmp/sc\\n($$>>/tmp/sc\\n($$
995 .	sy rc /tmp/sc\\n($$&
996 .	br \}
997 .SR
998 ..
999 .	\"IZ - initialization
1000 .de IZ
1001 .FB
1002 .nr TN 0
1003 .em EM
1004 .po 1i
1005 .nr PO 1i
1006 .if \\n(FM=0 .nr FM 1i
1007 .nr YY 0-\\n(FMu
1008 .if !\\n(PD .if n nr PD 1v
1009 .if t .if !\\n(PD .nr PD 0.3v
1010 .wh 0 NP
1011 .wh \\n(.pu-\\n(FMu FO
1012 .ch FO 16i
1013 .wh \\n(.pu-\\n(FMu FX
1014 .ch FO \\n(.pu-\\n(FMu
1015 .if t .wh -\\n(FMu/2u BT
1016 .if n .wh -\\n(FMu/2u-1v BT
1017 ..
1018 .\"		macro to restore ms foiling
1019 .de SR
1020 .nr BE 0
1021 .nr 1T 1
1022 .nr FM 0
1023 .nr PD 0
1024 .nr HM 0
1025 .nr KG 0
1026 .nr FP 0
1027 .nr GA 0
1028 .nr FP 0
1029 .\" changed rn F5 FE added rn FJ FS
1030 .rn FK FE
1031 .rn FJ FS
1032 .if '\\$1'' .bp
1033 .if !'\\$1'' \{\
1034 .di ZA
1035 .ce
1036 \\*(a(
1037 .sp
1038 .WB
1039 .di
1040 .rn ZA WB\}
1041 .nr FC -1
1042 .nr % 1
1043 .IZ
1044 .rm IZ
1045 .if '\\$1'' .RT
1046 .ds MN \\*(N1 \\*(N2 \\*(N3 \\*(N4 \\*(N5
1047 .nr MM \\nn
1048 .nr MC \\n(fc
1049 .nr MG \\n(wp
1050 .nr NA \\nu
1051 .if '\\n(ST'1' \{\
1052 .so /sys/lib/tmac/tmac.rscover
1053 . \" a line for troff to eat /lib/tmac
1054 .S1 \}
1055 .ll 6i
1056 .nr LL 6i
1057 .rr a b c d e f g h i j k
1058 .rr l m n o p q r s t u
1059 .rr v w x y z np tp nc tc
1060 .rr ud u! m2 dv
1061 .rr lp np la a1 a2 ar wp fc m1
1062 .rm DT TI AH SE KW TY NU MY
1063 .rm PR CI CO OC CV OV CE HD
1064 .rm FC ST TK HX HC DL EJ
1065 .rm CP SC a) b) k) N1 p) q) r)
1066 .rm N2 N3 N4 N5 X1 X2 X3 X4 X5
1067 .rm X1 X2 X3 X4 X5 F1 F2 F3 F4
1068 .rm F5
1069 .rm d) o) s) ve m! n! o! e( r(
1070 .rm x! y! z! x( d! ve u)
1071 .rm t) w) x) y) z) a( b( c( m(
1072 .rm n( o( p( s( t( SA ZI ZC ZO
1073 .rm ZS ZD ZN FT FB CX NN GS
1074 .rm ZB XX ZP ZZ
1075 .rm TM IM MF MR LT OK RP TR
1076 .rm TX AU AX AI AE SY S2 S0
1077 .rm S3
1078 ..
1079 .de RP
1080 .nr ST 2
1081 .SS
1082 ..
1083 .de TR
1084 .nr ST 3
1085 .ds MN \\$1
1086 .SS
1087 ..
1088 .de SS		\"RP or TR rename the world so old macros called
1089 .rm SG
1090 .nr CS 0
1091 .nr BE 0
1092 .nr 1T 0
1093 .nr FM 0
1094 .nr PD 0
1095 .nr HM 0
1096 .nr KG 0
1097 .nr FP 0
1098 .nr GA 0
1099 .nr FP 0
1100 .ll 6i
1101 .nr LL 6i
1102 .\" changed rn F5 FE added rn FJ FS
1103 .rn F6 FE
1104 .nr FC -1
1105 .nr % 1
1106 .IZ
1107 .rm IZ
1108 .pn 0
1109 .de TI
1110 .TL
1111 \\..
1112 .de SA
1113 .AB \\\\$1
1114 \\..
1115 .de SE
1116 .AE
1117 \\..
1118 .de AH
1119 .AU
1120 \\\\$1
1121 \\..
1122 .de DT
1123 .ND \\\\$1 \\\\$2 \\\\$3
1124 \\..
1125 .br
1126 .rr a b c d e f g h i j k
1127 .rr l m n o p q r s t u
1128 .rr v w x y z np tp nc tc
1129 .rr ud u! m2 dv
1130 .rr lp np la a1 a2 ar wp fc m1
1131 .rm DT KW TY NU MY
1132 .rm PR CI OC OV HD
1133 .rm FC ST TK HX HC DL EJ
1134 .rm CP SC a) b) k) N1 p) q) r)
1135 .rm d) o) s) ve m! n! o! e( r(
1136 .rm x! y! z! x( d! ve u)
1137 .rm t) w) x) y) z) a( b( c( m(
1138 .rm n( o( p( s( t( ZI ZC ZO
1139 .rm ZS ZD ZN FT FB CX NN GS
1140 .rm ZB XX ZP ZZ
1141 .rm TM IM MF MR LT
1142 ..
1143