-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmx-macros
1756 lines (1722 loc) · 40.2 KB
/
mx-macros
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Path: seismo!uunet!rs
From: [email protected] (Rich Salz)
Newsgroups: comp.sources.unix,comp.text
Subject: v09i063: Troff macros for "ACM Transactions"
Message-ID: <[email protected]>
Date: 16 Jun 87 23:41:04 GMT
Organization: UUNET Communications Services, Arlington, VA
Lines: 1746
Approved: [email protected]
Submitted by: [email protected] (Dan Berry)
Mod.sources: Volume 9, Issue 63
Archive-name: mx-macros
[ Slightly unusual -- it's not C code -- but no doubt many people will find
this worthwhile, if not for use than for study. In order to catch the
right readership, I'm also cross-posting this to comp.text, and I don't
intend to start a trend by doing that. --r$ ]
# This is a shell archive. Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
# Contents: acm.tos/ READ_ME mX.doc mX.7 tmac.X tmac.Xrefs acm.tos/refmacros
# acm.tos/skeleton
echo x - READ_ME
sed 's/^@//' > "READ_ME" <<'@//E*O*F READ_ME//'
Dear Colleagues
RE: Marc Moriconi's letter in SIGPLAN Notices concerning preparing
camera-ready copy for ACM Transactions in X with the help of LaTeX.
Those of you who prefer to use ditroff can do the same. In fact, by
using ditroff, you will more likely be able to typeset it with fonts
that appear more like those actually used by the ACM Transactions. One
can use fonts like these: Roman, Italic, Bold, and Sans Serif, as well
as the constant width font in which this letter is done.
Some time ago Shaula Yemini and I published a paper in TOPLAS for which
I prepared a camera-ready copy (S. Yemini and D.M. Berry, "A Modular
Verifiable Exception Handling Mechanism", Transactions on Programming
Languages and Systems 7:2, pp. 214-243, 1985). I used AT&T's ditroff
with the mX macros. The mX macro set was prepared UCLA for vanilla
troff about a decade ago by the then student Bruce Walker. It is an
incredibly clean macro set, which seems not to have been affected by
all the changes to troff and ditroff. By measuring the articles in one
issue with a ruler, I came up with initial register settings,
substitute definitions for some macros, refer macros, and a paper
skeleton that looked fairly good. After receiving the editor's marked
copy which revealed actual sizes in normal typesetting units, picas,
points, etc. I corrected these, to produce the camera-ready copy. We
prepared a follow-up paper, submitting it in nearly final form (only
the projected acceptance date and publication dates would have to be
changed!). This was done by using the previous paper as a skeleton.
Happily this paper was accepted, but we are still awaiting word of the
printing date.
As with Moriconi's experience, we proof with a laser printer, and then
when the paper is accepted and edited, we take the same file to a
commercial typesetter. As a matter of fact, the laser printer and the
typesetter we use talk PostScript\(tm (PostScript is a trademark of
Adobe Systems, Inc.) and can be sent the same PostScript output from
ditroff; the laser proof is an accurrate prediction of the typesetter's
output.
By this posting, I am making available the mX macro package together
with the paper skeleton. Using these would require changing your
paper's macro calls to use mX's. That is not too difficult, as one does
not do much more than start new sections, start new paragraphs, have
numbered lists, etc. If, however, you prefer to use another macro
package, or are submitting to another journal, it would not be
difficult to come up with register settings for the macro package for
the journal's style. A troff expert can do it in a day!
Daniel M. Berry UCLA Computer Science Department
3531 Boelter Hall, UCLA, Los Angeles, CA 90024-1600, USA
[email protected] ..!{sdcrdcf,ihnp4,cepu,trwspp,ucbvax}!ucla-cs!dberry
-----------------------
Below is a list of the files and directories contained herein. Install them
in the indicated place. The acm.tos files go with your home directory
mX.doc user level description- should go in /usr/lib/tmac
mX.7 man page- should go in /usr/man/man7
tmac.X macro package- should go in /usr/lib/tmac
tmac.Xrefs standard reference macros- should go in /usr/lib/tmac
acm.tos directory containing skeleton and refmacros for doing ACM
Transactions on xxxxx
acm.tos/refmacros
acm.tos/skeleton
@//E*O*F READ_ME//
chmod u=rw,g=,o= READ_ME
echo mkdir - acm.tos
mkdir acm.tos
chmod u=rwx,g=,o= acm.tos
echo x - mX.doc
sed 's/^@//' > "mX.doc" <<'@//E*O*F mX.doc//'
NROFF/TROFF MACROS by Bruce Walker
These macros are compatible with version 7 troff/nroff and eqn/neqn.
The macros have been designed to meet the needs of as many users as
possible by having most macros controlled by user settable variables.
The following scenario outlines how to take advantage of this:
.so /usr/lib/tmac/tmac.X \" bring in the macro file
.nr tf 1.5i \" make changes to variables
.ds Te 'EVEN PAGE'TITLE'LINE'
.ds To 'ODD PAGE'TITLE'LINE'
.en \" set up the environment so paging, etc. happens.
continue with the text of the paper etc.
USER MACROS
.en - set up the environment (ie. traps for page start and end).
- this should be called near the start of an nroff.
- "th" is the total space of header (in units);
- "bh" is space before and including header (in units)
- "tf" is the total space of footer (in units);
- "bf" is space before and including footer (in units);
.pp - start a paragraph.
- spaces "sh" vertical; needs "sg" vertical; indents "sf" units;
.sc - start a new chapter.
- begin a new page; can have 0 or 2 parameters; with 0 parameters,
the next two input lines are centered, after "sl" unit spaces;
With two parameters, the first can be either +,- or chapter #;
A + indicates that a one line title consisting of the second
parameter should be centered, after the appropriate spaces.
It should also appear as is in the Table of Contents.
A - indicates that the second parameter is to appear in the
Table of Contents but that no spacing or centering or printing
of a title is to be done.
With a chapter # as the first parameter, a
two line chapter title is centered after "sl" unit blank lines.
The first line is CHAPTER #; The second is as given in the
second parameter. The Table of Contents entry is the concat of
the two parameters.
.sa - start a new appendix.
- begin a new page and space down "sl" unit spaces. There can be
0 or 2 parameters. With 0 parameters the next two input lines
are centered. With two parameters, the first is the appendix
name/number. The second is the title. A two line appendix title
is centered after "sl" unit blank lines. The first line is
APPENDIX \\$1. The second is \\$2, where \\$1 and \\$2 are the
two parameters to .sa. The table of contents entry is
Appendix \\$1 \\$2 ............. page#
.su - start a new subsection.
- "sa" unit spaces are left; "sm" units are needed; There can be
0, 1 or 2 parameters. With zero parameters, the next input line
is underlined with .ul. With one parameter, it is underlined and
put as is in the table of contents. With two parameters, the
second parameter is a level number which is used to control the
indenting of the entry in the table of contents.
.es - example start;
- space "si" vertical; save mode (fill/nofill); switch to nofill
- indent "sj" units;
.ee - example end;
- space "sk" vertical; indent -"sj" units; restore fill mode if needed
.l1 - start a list;
- set the first tab to be the current indent + "sn" and 2 other
- tabs at 5m intervals; indent +"sn" units;
- There is an optional parameter. If a parameter is given, the
list is automatically numbered in "format" which is given
as the parameter (1 is straight numbering; i is roman numerals;
a is for letters (see .af built in command in ref manual)).
.e1 - end list;
- break; indent -"sn" units; restore tabs to default;
.le - list entry; done before each list entry.
- space down "sp" units; temporarily indents -"so" units.
- If the list is being numbered automatically (see .l1), then the
number, followed by a dot, followed by a tab and set up so
next user's input will go on the same line (ie. a \c) is done.
.fn - start footnote;
- If the user wishes to number footnotes on a page by page basis,
use either \*N (for superscripting) or \*O (for [#]) at the
reference point and at the start of the reference.
.ef - end footnote text.
.fs - figure start. Text up to .fe is printed in environment 2.
- If there is room on the current page, the figure will be printed
there. Otherwise the page will be filled with subsequent text
and the figure will appear at the top of the next page.
.fe - figure end. There is an optional parameter which is the entry
that will be put in the List of Figures.
.fg - full page figure. There is an optional parameter which is the
entry that will be put in the List of Figures. The page on
which the full page figure would be put is omitted (to save
troffing) but the page numbers are incremented accordingly.
NOTE: Use of this does not work with multi-columning (see MC).
.rb - reference begin.
- set tabs to "se", "se"+5, "se"+10; save current indent;
go to spacing set in "sq"; indent to "se";
.rf - reference entry.
- space "sd" units; temporarily indent -"se" units; need "sc" units;
.re - refernce end.
- reset indentation to that value saved at reference begin.
restore line spacing to it's previous value;
Restore tabs to default.
.LL - change line length and length of titles to the parameter given.
- This macro changes these lengths in all the environments.
.MC - Request to do multiple columns
This macro expects 4 parameters
- number of columns
- width of each column (units must be given).
- width of space between columns (units must be given).
- page offset of the whole thing (units must be given).
- NOTE: use of ".fg" does not work with multi-columning.
.PS - change the character point size to the parameter given.
- This macro changes the point size in all the environments.
.RT - reset tabs to standard nroff or troff.
.EQ - start an equation; save mode (fill/nofill); switch to nofill.
- 2 parameters: first is L,C, or I - for left justified,
centered or indented equation. Second is the equation number.
- if only 1 parameter, it is treated as an equation number unless
it is L, C, or I.
.EN - end and equation; restore fill mode if necessary.
.HS - a macro which is called at the beginning of the header macro.
The user can redefine this. It is initialized to null.
.HE - a macro which is called at the end of the header macro.
The user can redefine this. It is initialized to null.
.FS - a macro which is called at the beginning of the footer macro.
The user can redefine this. It is initialized to null.
.FE - a macro which is called at the end of the footer macro.
The user can redefine this. It is initialized to null.
HIDDEN MACROS
.hd - header macro, executed at the top of each page (after .en done).
.fo - footer macro, executed at the bottom of each page or when
footnotes must start to print.
.mf - multiple column footer processing.
.fx - end of page trap which is hit if footnotes are printing. It
saves excess footnotes in "fy".
.xf - print footnotes macro; called by .fo if there are any to print.
This can trap to .fx.
.fz - save left over footnote for printing on a subsequent page.
This is called by .hd if there were left over footnote text.
.Ff - print figure macro; called by .fo if there are any to print.
.Fa,Fb,Fc,Fd,Fe,F0 - used in figure collection and printing.
.T1,T2 - used in Table of Contents and List of Figure entry generation.
.SC - used by .sc to ensure that a new page is started. It is a recursive
.bp. A single .bp in .sc would be insufficient because it might
be used to get to a new page to print a figure. Then the chapter
would not be on a new page.
.ZZ - Cleanup at end of processing. This is automatically called at
the end of processing.
This will dump any figures which have been diverted and are
waiting for the next page. Also it will print the Table of
Contents and List of Figures if they are requested.
.AB - Abort and print error message.
REGISTERS USED OTHER THAN THOSE WHICH ARE USER SETTABLE
t : internal temporary used for page numbers.
x : counter- counts number of footnotes to be genned at bottom of page.
y : footer top - has negative of # u's from bottom of page at which
footer starts, includes space for footnotes
z : temporary variable used in footnote processing.
w : footnote counter usable by user to number his footnotes on each page
c : internal -- column count for multiple columning
z1 : internal -- size of leftover footnote
he : internal -- flag to footer to tell that it is in a header.
fa : internal -- flag from footer to header to tell it to do new page.
fg : internal -- flag indicating that a figure is being printed.
fn : internal -- flag indicating that a footnote is being processed
ex : internal -- flag indicating that processing is in an example
fs : internal -- flag indicating that a figure is being processed.
tt : internal -- flag to indicate that a figure has caused a trap
mx : internal -- line number saved to go back to for multiple columning.
cw,cs,co,cp: internal -- used for multiple columnning.
f0-f7 : internal - used for figures.
h1-h2 : internal - used for headers and footers.
l0-l9 : internal - used for lists
t1 : internal - used in reference macros to save status.
FI : internal - saves fill/nofill mode status in equations and examples
dn : troff counter - counts # of lines of text in last diversion
nl : troff counter - counts # of lines of text on current page
.p : troff variable - contains current page length
.t : troff variable - length to next trap
.i : troff variable - current indent.
.$ : troff variable - number of parameters to current macro.
.z : troff variable - current diversion name
% : troff variable - page number
@//E*O*F mX.doc//
chmod u=rw,g=,o= mX.doc
echo x - mX.7
sed 's/^@//' > "mX.7" <<'@//E*O*F mX.7//'
@.hc %
@.TH MX L
@.SH NAME
mX \- macros for formatting documents
@.SH SYNOPSIS
@.B "nroff \-mX"
[ options ]
file ...
@.br
@.B "troff \-mX"
[ options ]
file ...
@.SH DESCRIPTION
This package of
@.I nroff
and
@.I troff
macro definitions provides a canned formatting
facility for tech%nical papers in various formats.
When producing multi-column output on a terminal, filter
the output through
@.IR col (1).
@.PP
The macro requests are defined below.
Many
@.I nroff
and
@.I troff
requests are unsafe in conjunction with
this package, however these requests may be used with
impunity.
@.nf
@.IP
@.ta \w'.cw n 'u
\&.bp begin new page
\&.br break output line here
\&.sp n insert n spacing lines
\&.ls n (line spacing) n=1 single, n=2 double space
\&.na no alignment of right margin
\&.ce n center next n lines
\&.ul n underline next n lines
@.fi
@.PP
Output of the
@.I eqn,
@.I neqn,
@.I refer,
and
@.IR tbl (1)
preprocessors
for equations and tables is acceptable as input.
@.SH FILES
/usr/lib/tmac/tmac.X
@.br
/usr/lib/tmac/mX/tmac.Xlong
@.br
/usr/lib/tmac/tmac.Xtras
@.br
/usr/lib/tmac/tmac.Xrefs
@.SH "SEE ALSO"
eqn(1), troff(1), refer(1), tbl(1)
@.br
@.I "A Beginner's Guide to Nroff and Troff and the mX Macro Package"
by G. A. Hornor
@.tr &.
@.SH REQUESTS
@.PP
@.ta \w'.MC w x y z 'u +\w'Initial 'u +\w'Cause 'u
@.br
@.di x
\ka
@.br
@.di
@.in \nau
@.ti0
Request Initial Cause Explanation
@.ti0
Value Break
@.br
@.in \nau
@.ti0
\&.en - no Set up the environment (i.e. traps
for page start and end). This should be called near the
start of an nroff/troff.
@.ti0
\&.pp - yes Start a paragraph.
@.ti0
\&.sc \fIn x\fR 1 yes Start a new chapter. \fIn\fR
can be a number (or any arbitrary string of characters)
indicating the chapter ID after the word ``CHAPTER'', a `+' to omit
the chapter heading only, or `-' to omit both the chapter heading and
title \fIx\fR.
The table of contents is updated in all cases.
@.ti0
\&.cp \fIn x\fR 1 yes Start a new autonumbered chapter.
\fIn\fR is the chapter number (optional) and \fIx\fR is the
chapter title. Omiting \fIn\fR will cause chapters to be
automatically numbered.
@.ti0
\&.sa \fIn x\fR 1 yes Start a new appendix.
\fIn\fR and \fIx\fR have the same meaning as for .sc.
@.ti0
\&.su \fIx n\fR - yes Start a new subsection.
\fIn\fR is the (optional) level number of the subsection and \fIx\fR is
the title.
@.ti0
\&.ss \fIn x\fR 1 yes Start a new autonumbered subsection
for a thesis or dissertation. \fIn\fR is the level number
and \fIx\fR is the title.
@.ti0
\&.se \fIn x\fR 1 yes Start a new autonumbered subsection
for a paper. \fIn\fR is the level number and \fIx\fR is the
title.
@.ti0
\&.es no yes Start of an example (in nofill
mode).
@.ti0
\&.ee no yes End of an example (restores fill
mode).
@.ti0
\&.l1 \fIf\fR null yes Start a list. \fIf\fR
determines how the lists are labeled: \fI1\fR is straight
numbering, \fIi\fR is roman numberals, \fIa\fR is for
letters.
@.ti0
\&.e1 no yes End a list.
@.ti0
\&.le no yes Make an entry in a list.
@.ti0
\&.fn no no Start a footnote. Footnotes can be
numbered by using either \\*N (for superscripting) or \\*O
(for [#]) at the reference point and at the start of the
footnote.
@.ti0
\&.ef no no End a footnote.
@.ti0
\&.fs no no Start a floating keep (a figure
usually).
@.ti0
\&.fe \fIx\fR no no End a floating keep. \fIx\fR
is an optional title which will appear in the list of
figures.
@.ti0
\&.fg \fIx\fR no no Full page figure. Leaves a blank
unnumbered page. \fIx\fR is an optional title which will
appear in the list of figures.
@.ti0
\&.rb no yes Begin a list of references (as in a
bibliography).
@.ti0
\&.rf no yes Enter a reference in a list of
references.
@.ti0
\&.re no yes End a list of references.
@.ti0
\&.LL \fIn\fR 6.5i yes Change line length and length of
titles to the parameter given.
@.ti0
\&.MC \fIw x y z\fR no yes Request for multiple columns.
\fIw\fR is the number of columns, \fIx\fR is the width of
each column (units must be given), \fIy\fR is the width of
space between colums (units must be given), and \fIz\fR is
the page offset (units must be given).
@.ti0
\&.PS \fIn\fR 10 no Change the character point size to
the parameter given.
@.ti0
\&.RT - no Reset tabs to standard nroff or
troff.
@.ti0
\&.EQ \fIx y\fR - no Start a displayed equation.
\fIx\fR is either \fIL, C,\fR or \fII\fR for left-justified,
centered, or indented equation. \fIy\fR is the equation
number. If only one parameter is given, it is treated as the
equation number unless it is \fIL, C,\fR or \fII\fR.
@.ti0
\&.EN - no End a displayed equation.
@.ti0
\&.HS - no A null macro which the user can
redefine. It is called at the beginning of the page header
macro.
@.ti0
\&.HE - no A null macro which the user can
redefine. It is called at the end of the page header macro.
@.ti0
\&.FS - no A null macro which the user can
redefine. It is called at the beginning of the page footer
macro.
@.ti0
\&.FE - no A null macro which the user can
redefine. It is called at the end of the page footer macro.
@//E*O*F mX.7//
chmod u=rw,g=,o= mX.7
echo x - tmac.X
sed 's/^@//' > "tmac.X" <<'@//E*O*F tmac.X//'
@.\" NROFF/TROFF MACROS by Bruce Walker
@.\"
@.\" Please refer to /usr/lib/tmac/mX.doc and man mX for documentation.
@.deen
@.wh0 hd
@.wh-\\n(tfu fo
@.chfo 32000
@.wh-\\n(tfu fx
@.chfo -\\n(tfu
@.nrx 0 1
@.nry 0-\\n(tfu
@.emZZ
@.nrw 1
@.nrhe0
@.nrfa0
@..
@.depp
@.br
@.ne\\n(sgv+\\n(shv
@.sp\\n(shv
@.ti+\\n(sfu
@..
@.desc
@.br
@.rs
@.SC
@.sv\\n(slu
@.ie\\n(.$\{\
@.if!\\n(.$-1 .AB"1 and not 2 parameters were sent to .sc"
@.ie"\\$1"+"\{.if \\n(ft .T1 "\\$2" "\\n%" "0" "1"
@.ce1
\\$2\}
@.el\{\
@.ie"\\$1"-"\{.if \\n(ft .T1 "\\$2" "\\n%" "0" "1"\}
@.el\{\
@.if\\n(ft .T1 "\\$1 \\$2" "\\n%" "0" "1"
@.ce2
\\*(CH\\$1
\\$2\}\}\}
@.el.ce 2
@..
@.desa
@.br
@.rs
@.SC
@.sv\\n(slu
@.ie\\n(.$\{\
@.if!\\n(.$-1 .AB"1 and not 2 parameters were sent to .sa"
@.if\\n(ft\{.T1 "\\*(AP\\$1 \\$2" "\\n%" "0" "1"\}
@.ce2
\\*(AX\\$1
\\$2\}
@.el.ce 2
@..
@.desu
@.br
@.ne\\n(smu+\\n(sau
@.sp\\n(sau
@.ie\\n(.$\{\
@.ie\\n(.$-1\{\
@.if\\n(ft .T1 "\\$1" "\\n%" "\\$2" "0"\}
@.el.if \\n(ft .T1 "\\$1" "\\n%" "0" "0"
@.ft\\n(fv
\\$1\fP\}
@.el.ul 1
@..
@.dees
@.ie\\n(ex .AB"Nesting examples is a no no"
@.el.nr ex 1
@.sp\\n(siv
@.nrFI\\n(.u
@.nf
@.in+\\n(sju
@..
@.deee
@.ie!\\n(ex .AB"Ending an example (.ee) without starting an example"
@.el.nr ex 0
@.sp\\n(skv
@.in-\\n(sju
@.if\\n(FI .fi
@..
@.del1
@.if\\n+(l0=4 .AB"Nesting of lists too deep"
@.ta\\n(sou +5m +5m
@.in+\\n(snu
@.afl1 1
@.nrl3\\n(l2
@.nrl2\\n(l1
@.nrl9\\n(l8
@.nrl8\\n(l7
@.rnl5 l6
@.rnl4 l5
@.nrl10 1
@.nrl70
@.dsl4 "1
@.if\\n(.$\{\
@.dsl4 "\\$1
@.nrl71\}
@.afl1 \\*(l4
@..
@.dee1
@.br
@.in-\\n(snu
@.if\\n-(l0<0 .AB"Ending more lists than started"
@.ie\\n(l0=0\{\
@.RT\}
@.el\{\
@.nrl1\\n(l2 1
@.nrl2\\n(l3 1
@.nrl7\\n(l8
@.nrl8\\n(l9
@.rnl5 l4
@.rnl6 l5
@.afl1 \\*(l4\}
@..
@.dele
@.sp\\n(spu
@.ti-\\n(sou
@.if\\n(l7=1\{\
\\n+(l1.\t\c\}
@..
@.defn
@.ie\\nx .ne \\n(rcv-2v
@.el.ne \\n(rcv
@.if\\n(fn .AB"Nesting of footnotes is a no no"
@.nrfn1
@.daFN
@.ev1
@.ie\\n+x=1\{\
\l'1i'
@.br\}
@.el.sp \\n(srv
@.fi
@.ad
@..
@.deef
@.if!\\n(fn .AB"Ending a footnote (.ef) when one was not started"
@.nrfn0
@.br
@.nrz \\n(.v
@.ev
@.di
@.nry -\\n(dn
@.if(\\n(nlu+1v)>(\\n(.pu+\\nyu-1v)\{\
@.nry (2v+\\n(nlu-\\n(.pu)u\}
@.chfo (\\nyu-1v)
@.nrw +1
@..
@.defs
@.if\\n(fs .AB"Nesting of figures is a no no"
@.if\\n(f7>0 .AB"Too many figures diverted near page \\n%"
@.nrf0+1
@.nrfs1
@.daF2
@.ev2
@.dt\\n(.pu-\\n(thu-\\n(tfu Fc
@.nrtt0
@..
@.defe
@.ie!\\n(fs .AB"Ending a figure (.fe) which was not started"
@.el.nr fs 0
@.br
@.ie\\n(tt\{\
@.ev
@.di
@.if\\n(dn>0\{\
@.ie\\n(f0=3 .AB"Too many figures diverted near page \\n%"
@.el\{\
@.tmNROFF/TROFF Warning: A figure after page \\n% was truncated.\}\}\}
@.el\{\
@.ev
@.da
@.nrf2+\\n(dnu\}
@.ie\\n(.$ .Fb "\\$1"
@.el\{\
@.ie\\n(f0+\\n(f5>1 .Fd " " "0"
@.el.Fe " " "0"\}
@..
@.defg
@.nrt 2
@.ie\\n(f7>0 .nr f7 +1 1
@.el\{\
@.ie\\n(f0>1 .nr f7 1 1
@.el\{\
@.nrt 1
@.ie\\n(f6>0 .nr f6 +1 1
@.el\{\
@.ie\\n(f0=1 .nr f6 1 1
@.el\{\
@.nrf5+1 1
@.nrt 0\}\}\}\}
@.nrt +\\n%+\\n(f5+\\n(f6+\\n(f7
@.if\\n(ff+\\n(.$-1 .F0 "\\$1" "\\nt"
@..
@.derb
@.ta\\n(sem +5m +5m
@.nrt1\\n(.i
@.ls\\n(sq
@.in\\n(sem
@..
@.derf
@.br
@.ne\\n(scu+\\n(sdu
@.sp\\n(sdu
@.ti-\\n(sem
@..
@.dere
@.br
@.ls
@.in\\n(t1u
@.RT
@..
@.deLL
@.if!\\n(.$ .AB"Called LL with no parameter"
@.ev2
@.lt\\$1
@.ll\\$1
@.ev
@.ev2
@.lt\\$1
@.ll\\$1
@.ev
@.ev1
@.lt\\$1
@.ll\\$1
@.ev
@.ev0
@.lt\\$1
@.ll\\$1
@.ev
@..
@.deMC
@.if\\n(.$<4 .AB"Called MC with less than 4 parameters"
@.nrcn\\$1
@.nrcw\\$2
@.nrcs\\$3
@.nrco\\$4
@.po\\n(cou
@.LL\\$2
@.nrc 1 1
@.mkmx
@..
@.dePS
@.ev2
@.ps\\$1
@.ev
@.ev2
@.ps\\$1
@.ev
@.ev1
@.ps\\$1
@.ev
@.ev0
@.ps\\$1
@.ev
@..
@.deVS
@.ev2
@.vs\\$1
@.ev
@.ev2
@.vs\\$1
@.ev
@.ev1
@.vs\\$1
@.ev
@.ev0
@.vs\\$1
@.ev
@..
@.deRT
@.ien .ta .8i +.8i +.8i +.8i +.8i +.8i +.8i +.8i +.8i +.8i
@.el.ta .5i +.5i +.5i +.5i +.5i +.5i +.5i +.5i +.5i +.5i
@..
@.deEQ
@.br
@.ne2.5
@.ift .sp .5
@.ifn .sp 1P
@.nrFI\\n(.u
@.nf
@.ce
@.dsEL \\$1
@.if\\n(.$-1 .ds EL \\$2
@.nrLE\\n(.$
@.ie"\\$1"L"\{\
@.ce0
@.nrLE-1\}
@.el\{\
@.ie"\\$1"C" .nr LE -1
@.el\{\
@.if"\\$1"I"\{\
@.ce0
@.ti+10n
@.nrLE-1\}\}\}
@..
@.deEN
@.ce0
@.lt\\n(.lu
@.if\\n(LE\{\
@.ien\{\
@.sp-1
@.tl'''\\*(EL'\}
@.el\{\
@.sp-1-\\n(.au
@.tl'''\\*(EL'
@.sp\\n(.au\}\}
@.if\\n(FI .fi
@.ifn .sp 1P
@.ift .sp 0.5
@..
@.deHS
@..
@.deHE
@..
@.deFS
@..
@.deFE
@..
@.dehd
@.HS
@.nrhe+1
@.ie\\n(cn>1\{\
@.ie\\nc>\\n(cn\{\
'sp\\n(bhu-1v
@.lt(\\n(cn*\\n(cwu)u+(\\n(csu*(\\n(cn-1))u
@.iee .tl \\*(Te
@.el.tl \\*(To
'sp|\\n(thu
@.nrc 1 1
@.mkmx\}
@.el\{\
@.po+\\n(cwu+\\n(csu
'sp|\\n(mxu\}\}
@.el\{\
@.if\\n(f5\{\
@.nr% +\\n(f5
@.nrf50 1\}
'sp\\n(bhu-1v
@.iee .tl \\*(Te
@.el.tl \\*(To
'sp|\\n(thu\}
@.chfx -\\n(tfu
@.chfo -\\n(tfu
@.if\\n(z1 .fz
@.chfo -\\n(tfu
@.if!\\n(f0 .ns
@.if\\n(f0\{\
@.nrf5\\n(f6
@.nrf6\\n(f7
@.nrf70
@.Ff
@.ie\\n(fa\{\
@.nrfa0
@.nrh21\}
@.el\{\
@.ie\\nx\{.if (\\n(nlu+5v)>(\\n(.p+\\nyu) .nr h1 1\}
@.el\{.if \\n(.tu<6v .nr h1 1\}\}\}
@.if\\n(h1=1\{\
@.nrh10
'bp\}
@.if\\n(h2=1\{\
@.nrh20
@.fo\}
@.chfo (\\nyu-1v)
@.nrhe-1
@.HE
@..
@.defo
@.FS
@.if!\\n(he\{.if \\nx .xf\}
@.nrfa0
@.ie\\n(fg\{\
@.nrfa1
@.diGA\}
@.el\{\
@.ie\\n(cn<2\{\
'chfo 32000
'chfx 32000
'sp(\\n(.pu-\\n(nlu-\\n(tfu+\\n(bfu-1v)u
@.iee .tl \\*(Be
@.el.tl \\*(Bo
'bp\}
@.el.mf\}
@.FE
@..
@.demf
@.ie\\n+c<=\\n(cn .hd
@.el\{\
@.po\\n(cou
@.lt(\\n(cn*\\n(cwu)u+(\\n(csu*(\\n(cn-1))u
'chfo 32000
'chfx 32000
'sp(\\n(.pu-\\n(nlu-\\n(tfu+\\n(bfu-1v)u
@.iee .tl \\*(Be
@.el.tl \\*(Bo
'bp\}
@..
@.defx
@.if\\nx .di fy
@..
@.defz
@.nrx 0 1
@.nry 0-\\n(tfu
@.nrz10
@.fn
@.nf
@.fy
@.fi
@.ef
@.nrw 1 1
@..
@.dexf
@.ev1
@.nf
@.sp(\\n(.pu+\\nyu-\\n(nlu)u
@.FN
@.rmFN
@.ie"\\n(.z"fy"\{\
@.di
@.nrz1\\n(dn\}
@.el.nr z1 0
@.nrx 0 1
@.nry 0-\\n(tfu
@.ev
@.nrw 1 1
@..
@.deFf
@.nrf10
@.ev2
@.nf
@.nrfg1
@.F1
@.nrfg0
@.if\\n(fa .di
@.br
@.ev
@.rmF1
@.if\\n(f0-1 .Fa
@.nrf0-1
@..
@.deFa
@.daF1
@.ev2
@.nf
@.F2
@.br
@.ev
@.da
@.nrf1+\\n(f2
@.nrf20
@.rmF2
@..
@.deFb
@.ie\\n(f0+\\n(f5>1\{\
@.Fd"\\$1" "1"\}
@.el\{\
@.Fe"\\$1" "1"\}
@..
@.deFc
@.ev
@.di
@.nrf2\\n(dnu
@.nrtt1
@.diGA
@.ev2
@..
@.deFd
@.ie\\n(f0=3\{\
@.nrf02
@.nrt \\n%+\\n(f5+\\n(f6+2\}
@.el\{\
@.nrf02
@.nrt \\n%+\\n(f5+\\n(f6+2
@.if\\n(f6=0\{\
@.if(\\n(.pu-\\n(f1u-\\n(f2u-\\n(thu-\\n(tfu)>=0\{\
@.nrf0-1
@.nrt \\n%+\\n(f5+1
@.Fa\}\}\}
@.if'\\n(ff\\$2'11' .F0 "\\$1" "\\nt"
@..
@.deFe
@.rmF1
@.nrf10
@.Fa
@.nrt \\n%+\\n(f5+1 1
@.ie\\n(f1+2v>\\n(.tu\{.if '\\$2\\n(ff'11' .F0 "\\$1" "\\nt"\}
@.el\{\
@.if'\\$2\\n(ff'11'\{\
@.F0"\\$1" "\\n-t"\}
@.br
@.Ff
@.if\\n(fa\{\
@.nrfa0
@.fo\}\}
@..
@.deF0
@.daFP
@.ev2
@.br
\t
@.T2"\\$1" "\\$2" "0"
@.br
@.RT
@.ev
@.da
@..
@.deT1
@.daTP
@.ev2
@.br
@.if'\\$4'1' .sp 1v