summaryrefslogtreecommitdiff
path: root/tmac/groff_ms.man
blob: a9e0aee460c03a35c8b57fcde61ba00dc540997e (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
'\" t
.ig
Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2005, 2006
  Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.

Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be included in
translations approved by the Free Software Foundation instead of in
the original English.
..
.
.do nr groff_ms_C \n[.C]
.cp 0
.
.TH GROFF_MS @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
.
.
.
.SH NAME
.
groff_ms \- groff ms macros
.
.
.
.SH SYNOPSIS
.
.B groff
.B \-ms
[
.IR options .\|.\|.\&
]
[
.IR files .\|.\|.\&
]
.br
.B groff
.B \-m\ ms
[
.IR options .\|.\|.\&
]
[
.IR files .\|.\|.\&
]
.
.
.
.SH DESCRIPTION
.
This manual page describes the GNU version of the
.I ms
macros,
part of the
.I groff
typesetting system.
The
.I ms
macros are mostly compatible with the
documented behavior of the 4.3
.SM BSD
Unix
.I ms
macros (see
.I Differences from troff ms
below for details).
The
.I ms
macros are suitable for reports, letters, books, and
technical documentation.
.
.
.
.SH USAGE
.
The
.I ms
macro package expects files to have
a certain amount of structure.
The simplest documents can begin with a paragraph macro
and consist of text separated by paragraph macros
or even blank lines.
Longer documents have a structure as follows:
.
.TP
.B "Document type"
If you use the
.B RP
(report) macro at the beginning of the document,
.I groff
prints the cover page information on its own page;
otherwise it prints the information on the
first page with your document text immediately following.
Other document formats found in AT&T
.I troff
are specific to AT&T
or Berkeley, and are not supported in
.IR "groff ms" .
.
.TP
.B "Format and layout"
By setting number registers,
you can change your document's type (font and size),
margins, spacing, headers and footers, and footnotes.
See 
.I "Document control registers"
below for more details.
.
.TP
.B "Cover page"
A cover page consists of a title,
and optionally the author's name and institution,
an abstract, and the date.
See
.I "Cover page macros"
below for more details.
.
.TP
.B "Body"
Following the cover page is your document.
It consists of paragraphs, headings, and lists.
.
.TP
.B "Table of contents"
Longer documents usually include a table of contents,
which you can add by placing the
.B TC
macro at the end of your document.
.
.
.SS "Document control registers"
.
The following table lists the document control
number registers.
For the sake of consistency,
set registers related to margins at the beginning of your document,
or just after the
.B RP
macro.
.
.LP
.ne 12
.B Margin settings
.RS
.na
.TS
cb   s cb s s cb s cb s
afCW s l  s s l  s l  s.
Reg.	Definition	Effective	Default
_
PO	T{
Page offset (left margin)
T}	T{
next page
T}	1i
LL	T{
Line length
T}	next para.	6i
LT	T{
Header/footer length
T}	next para.	6i
HM	T{
Top (header) margin
T}	next page	1i
FM	T{
Bottom (footer) margin
T}	next page	1i
_
.TE
.RE
.
.LP
.ne 12
.B Text settings
.RS
.TS
cb   s cb s s cb s cb s
afCW s l  s s l  s l  s.
Reg.	Definition	Effective	Default
_
PS	T{
Point size
T}	next para.	10p
VS	T{
Line spacing (leading)
T}	next para.	12p
PSINCR	T{
Point size increment
for section headings of
increasing importance
T}	next heading	1p
GROWPS	T{
Heading level
beyond which PSINCR
is ignored
T}	next heading	0
_
.TE
.RE
.
.LP
.ne 11
.B Paragraph settings
.RS
.TS
cb cb s cb cb
afCW l s l l .
Reg.	Definition	Effective	Default
_
PI	T{
Initial indent
T}	next para.	5n
PD	T{
Space between paragraphs
T}	next para.	0.3v
QI	T{
Quoted paragraph indent
T}	next para.	5n
PORPHANS	T{
Number of initial lines
to be kept together
T}	next para.	1
HORPHANS	T{
Number of initial lines
to be kept with heading
T}	next heading	1
_
.TE
.RE
.
.LP
.ne 7
.B Footnote settings
.RS
.TS
cb cb cb cb
afCW l l l .
Reg.	Definition	Effective	Default
_
FL	Footnote length	next footnote	\[rs]n[LL]*5/6
FI	Footnote indent	next footnote	2n
FF	Footnote format	next footnote	0
FPS	Point size	next footnote	\[rs]n[PS]-2
FVS	Vert. spacing	next footnote	\[rs]n[FPS]+2
FPD	Para. spacing	next footnote	\[rs]n[PD]/2
_
.TE
.RE
.
.LP
.ne 6
.B Other settings
.RS
.TS
cb   s cb s s cb s cb s
afCW s l  s s l  s l  s.
Reg.	Definition	Effective	Default
_
MINGW	T{
Minimum width between columns
T}	next page	2n
_
.TE
.ad
.RE
.
.
.SS "Cover page macros"
.
Use the following macros to create a cover page for your document
in the order shown.
.
.TP
.B .RP [no]
Specifies the report format for your document.
The report format creates a separate cover page.
With no
.B RP
macro,
.I groff
prints a subset of the
cover page on page\~1 of your document.
.
.IP
If you use the optional
.B no
argument,
.I groff
prints a title page but
does not repeat any of the title page information
(title, author, abstract, etc.\&)
on page\~1 of the document.
.
.TP
.B .P1 
(P-one) Prints the header on page\~1.
The default is to suppress the header.
.
.TP
.BI ".DA [" xxx ]
(optional) Print the current date,
or the arguments to the macro if any,
on the title page (if specified)
and in the footers.
This is the default for
.IR nroff .
.
.TP
.BI ".ND [" xxx ]
(optional) Print the current date,
or the arguments to the macro if any,
on the title page (if specified)
but not in the footers.
This is the default for
.IR troff .
.
.TP
.B .TL
Specifies the document title.
.I Groff
collects text following the
.B TL
macro into the title, until reaching the author name or abstract.
.
.TP
.B .AU
Specifies the author's name.
You can specify multiple authors by using an
.B AU
macro for each author.
.
.TP
.B .AI
Specifies the author's institution.
You can specify multiple institutions.
.
.TP
.B .AB [no]
Begins the abstract.
The default is to print the word
.BR ABSTRACT ,
centered and in italics, above the text of the abstract.
The option
.B no
suppresses this heading.
.
.TP
.B .AE
End the abstract.
.
.
.SS Paragraphs
.
Use the
.B PP
macro to create indented paragraphs,
and the
.B LP
macro to create paragraphs with no initial indent.
.
.PP
The
.B QP
macro indents all text at both left and right margins.
The effect is identical to the HTML
.B <BLOCKQUOTE>
element.
The next paragraph or heading
returns margins to normal.
.
.PP
The
.B XP
macro produces an exdented paragraph.
The first line of the paragraph begins at
the left margin,
and subsequent lines are indented
(the opposite of
.BR PP ).
.
.PP
For each of the above paragraph types,
and also for any list entry introduced by the
.B IP
macro
(described later),
the document control register
.BR PORPHANS ,
sets the
.I minimum
number of lines which must be printed,
after the start of the paragraph,
and before any page break occurs.
If there is insufficient space remaining on the current page
to accommodate this number of lines,
then a page break is forced
.I before
the first line of the paragraph is printed.
.
.PP
Similarly,
when a section heading
(see subsection
.I Headings
below)
preceeds any of these paragraph types,
the
.B HORPHANS
document control register specifies the
.I minimum
number of lines of the paragraph
which must be kept on the same page as the heading.
If insufficient space remains on the current page
to accommodate the heading and this number of lines of paragraph text,
then a page break is forced
.I before
the heading is printed.
.
.
.SS Headings
.
Use headings to create a hierarchical structure
for your document.
By default,
the
.I ms
macros print headings in
.B bold
using the same font family and point size as the body text.
For output devices which support scalable fonts,
this behaviour may be modified,
by defining the document control registers,
.B GROWPS
and
.BR PSINCR .
.
.PP
The following heading macros are available:
.
.TP
.BI .NH\  xx
Numbered heading.
The argument
.I xx
is either a numeric argument to indicate the
level of the heading, or
.I S\ xx\ xx\ \c
".\|.\|."
to set the section number explicitly.
If you specify heading levels out of sequence,
such as invoking
.B ".NH\ 3"
after
.BR ".NH\ 1" ,
.I groff
prints a warning on standard error.
.
.IP
If the
.B GROWPS
register is set to a value
greater than the level of the heading,
then the point size of the heading will be increased by
.B PSINCR
units over the text size specified by the
.B PS
register,
for each level by which the heading level is less than
the value of
.BR GROWPS .
For example,
the sequence:
.
.RS
.ne 12
.nf
.IP
\&.nr PS 10
\&.nr GROWPS 3
\&.nr PSINCR 1.5p
\&.
\&.NH 1
Top Level Heading
\&.
\&.NH 2
Second Level Heading
\&.
\&.NH 3
Third Level Heading
.fi
.RE
.
.IP
will cause
.RI \*(lq 1.\ Top\ Level\ Heading \*(rq
to be printed in 13pt
.B bold
text, followed by
.RI \*(lq 1.1.\ Second\ Level\ Heading \*(rq
in 11.5pt
.B bold
text, while
.RI \*(lq 1.1.1.\ Third\ Level\ Heading \*(rq,
and all more deeply nested heading levels,
will remain in the 10pt
.B bold
text which is specified by the
.B PS
register.
.
.IP
Note that the value stored in
.B PSINCR
is interpreted in
.I groff
basic units;
the
.I p
scaling factor should be employed,
when assigning a value specified in points.
.
.IP
After invoking
.BR .NH ,
the assigned heading number is available in the strings
.B SN-DOT
(exactly as it appears in the formatted heading),
and
.B SN-NO-DOT
(with its final period omitted).
The string
.B SN
is also defined,
as an alias for
.BR SN-DOT ;
if preferred,
the user may redefine it as an alias for
.BR SN-NO-DOT ,
'ne 10
by including the initialisation:
.
.RS
.nf
.IP
\&.ds SN-NO-DOT
\&.als SN SN-NO-DOT
.fi
.RE
.
.IP
.I before
the first use of
.BR .NH ,
or simply:
.
.RS
.nf
.IP
\&.als SN SN-NO-DOT
.fi
.RE
.
.IP
.I after
the first use of
.BR .NH .
.
.TP
.BI .SH\ [ xx ]
Unnumbered subheading.
The use of the optional
.I xx
argument is a GNU extension,
which adjusts the point size of the unnumbered subheading
to match that of a numbered heading,
introduced using
.BI .NH\  xx
with the same value of
.IR xx .
For example,
given the same settings for
.BR PS ,
.B GROWPS
and
.BR PSINCR ,
as used in the preceeding
.B .NH
example,
the sequence:
.
.RS
.ne
.nf
.IP
\&.SH 2
An Unnumbered Subheading
.fi
.RE
.
.IP
will print
.RI \*(lq "An Unnumbered Subheading" \*(rq
in 11.5pt
.B bold
text.
.
.
.SS Highlighting
.
The
.I ms
macros provide a variety of methods to highlight
or emphasize text:
.
.TP
.B ".B [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
Sets its first argument in
.BR "bold type" .
If you specify a second argument,
.I groff
prints it in the previous font after
the bold text, with no intervening space
(this allows you to set punctuation after
the highlighted text without highlighting
the punctuation).
Similarly, it prints the third argument (if any)
in the previous font
.B before
the first argument.
For example,
.RS
.
.IP
\&.B foo ) (
.RE
.
.IP
prints
.RB ( foo ).
.
.IP
If you give this macro no arguments,
.I groff
prints all text following in bold until
the next highlighting, paragraph, or heading macro.
.
.TP
.B ".R [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
Sets its first argument in
roman (or regular) type.
It operates similarly to the
.B B
macro otherwise.
.
.TP
.B ".I [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
Sets its first argument in
.IR "italic type" .
It operates similarly to the
.B B
macro otherwise.
.
.TP
.B ".CW [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
Sets its first argument in a constant width face.
It operates similarly to the
.B B
macro otherwise.
.
.TP
.B ".BI [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]"
Sets its first argument in bold italic type.
It operates similarly to the
.B B
macro otherwise.
.
.TP
.BI ".BX [" txt ]
Prints its argument and draws a box around it.
If you want to box a string that contains spaces,
use a digit-width space (\[rs]0).
.
.TP
.BI ".UL [" txt " [" post ]]
Prints its first argument with an underline.
If you specify a second argument,
.I groff
prints it in the previous font after
the underlined text, with no intervening space.
.
.TP
.B .LG
Prints all text following in larger type
(2\~points larger than the current point size) until
the next font size, highlighting, paragraph, or heading macro.
You can specify this macro multiple times
to enlarge the point size as needed.
.
.TP
.B .SM
Prints all text following in
smaller type
(2\~points smaller than the current point size) until
the next type size, highlighting, paragraph, or heading macro.
You can specify this macro multiple times
to reduce the point size as needed.
.
.TP
.B .NL
Prints all text following in
the normal point size
(that is, the value of the
.B PS
register).
.
.TP
.BI \[rs]*{ text \[rs]*}
Print the enclosed
.I text
as a superscript.
.
.
.SS Indents
.
You may need to indent sections of text.
A typical use for indents is to create nested lists and sublists.
.
.PP
Use the
.B RS
and
.B RE
macros to start and end a section of indented text, respectively.
The
.B PI
register controls the amount of indent.
.
.PP
You can nest indented sections as deeply as needed by
using multiple, nested pairs of
.B RS
and
.BR RE .
.
.
.SS Lists
.
The
.B IP
macro handles duties for all lists.
Its syntax is as follows:
.
.TP
.BI ".IP [" marker " [" width ]]
.
.IP
The
.I marker
is usually a bullet character
.B \[rs](bu
for unordered lists,
a number (or auto-incrementing number register) for numbered lists,
or a word or phrase for indented (glossary-style) lists.
.
.IP
The
.I width
specifies the indent for the body of each list item.
Once specified, the indent remains the same for all
list items in the document until specified again.
.\" -----
.br
.ne 15
.
.
.SS "Tab stops"
.
Use the
.B ta
request to set tab stops as needed.
Use the
.B TA
macro to reset tabs to the default (every 5n).
You can redefine the
.B TA
macro to create a different set of default tab stops.
.
.
.SS "Displays and keeps"
.
Use displays to show text-based examples or figures
(such as code listings).
Displays turn off filling, so lines of code can be
displayed as-is without inserting
.B br
requests in between each line.
Displays can be 
.I kept
on a single page, or allowed to break across pages.
The following table shows the display types available.
.RS
.ne 11
.na
.TS
cb   s s    s cbt s s
cb   s cb   s ^   s s
lfCW s lfCW s l   s s.
Display macro	Type of display
With keep	No keep
_
\&.DS L	\&.LD	Left-justified.
\&.DS I [\fIindent\fP]	\&.ID	T{
Indented (default indent in the \fBDI\fP register).
T}
\&.DS B	\&.BD	T{
Block-centered (left-justified, longest line centered).
T}
\&.DS C	\&.CD	Centered.
\&.DS R	\&.RD	Right-justified.
_
.TE
.RE
.ad
.
.LP
Use the
.B DE
macro to end any display type.
The macros
.B Ds
and
.B De
were formerly provided as aliases for
.B DS
and
.BR DE ,
respectively, but they have been removed, and should no longer be used.
X11 documents which actually use
.B Ds
and
.B De
always load a specific macro file from the X11 distribution (macros.t)
which provides proper definitions for the two macros.
.PP
To
.I keep
text together on a page,
such as
a paragraph that refers to a table (or list, or other item)
immediately following, use the
.B KS
and
.B KE
macros.
The
.B KS
macro begins a block of text to be kept on a single page,
and the
.B KE
macro ends the block.
.
.PP
You can specify a
.I "floating keep"
using the
.B KF
and
.B KE
macros.
If the keep cannot fit on the current page,
.I groff
holds the contents of the keep and allows text following
the keep (in the source file) to fill in the remainder of
the current page.
When the page breaks,
whether by an explicit
.B bp
request or by reaching the end of the page,
.I groff
prints the floating keep at the top of the new page.
This is useful for printing large graphics or tables
that do not need to appear exactly where specified.
.
.PP
The macros
.B B1
and
.B B2
can be used to enclose a text within a box;
.B .B1
begins the box, and
.B .B2
ends it.
Text in the box is automatically placed in a diversion
(keep).
.
.
.SS "Tables, figures, equations, and references"
.
The
.I -ms
macros support the standard
.I groff
preprocessors:
.IR tbl ,
.IR pic ,
.IR eqn ,
and
.IR refer .
Mark text meant for preprocessors by enclosing it
in pairs of tags as follows:
.
.TP
.BR ".TS [H]" " and " .TE
Denotes a table, to be processed by the
.I tbl
preprocessor.
The optional
.BR H "\~argument"
instructs
.I groff
to create a running header with the information
up to the
.B TH
macro.
.I Groff
prints the header at the beginning of the table;
if the table runs onto another page,
.I groff
prints the header on the next page as well.
.
.TP
.BR .PS " and " .PE
Denotes a graphic, to be processed by the
.I pic
preprocessor.
You can create a
.I pic
file by hand, using the
AT&T
.I pic
manual available on the Web as a reference,
or by using a graphics program such as
.IR xfig .
.
.TP
.BR ".EQ [\fI\,align\/\fP]" " and " .EN
Denotes an equation, to be processed by the
.I eqn
preprocessor.
The optional
.I align
argument can be
.BR C ,
.BR L ,
or\~\c
.B I
to center (the default), left-justify, or indent
the equation.
.
.TP
.BR .[ " and " .]
Denotes a reference, to be processed by the
.I refer
preprocessor.
The GNU
.IR @g@refer (@MAN1EXT@)
manual page provides a comprehensive reference
to the preprocessor and the format of the
bibliographic database.
.
.
.SS Footnotes
.
The
.I ms
macros provide a flexible footnote system.
You can specify a numbered footnote by using the
.B \[rs]**
escape, followed by the text of the footnote
enclosed by
.B FS
and
.B FE
macros.
.
.PP
You can specify symbolic footnotes
by placing the mark character (such as
.B \[rs](dg
for the dagger character) in the body text,
followed by the text of the footnote
enclosed by
.B FS\ \[rs](dg
and
.B FE
macros.
.
.PP
You can control how
.I groff
prints footnote numbers by changing the value of the
.B FF
register as follows:
.RS
.ne 7
.
.TP
0
Prints the footnote number as a superscript; indents the footnote (default).
.
.TP
1
Prints the number followed by a period (like\~1.\&)
and indents the footnote.
.
.TP
2
Like\~1, without an indent.
.
.TP
3
Like\~1, but prints the footnote number as a hanging paragraph.
.
.LP
.RE
You can use footnotes safely within keeps and displays,
but avoid using numbered footnotes within floating keeps.
You can set a second
.B \[rs]**
between a
.B \[rs]**
and its corresponding
.BR .FS ;
as long as each
.B .FS
occurs
.I after
the corresponding
.B \[rs]**
and the occurrences of
.B .FS
are in the same order as the corresponding occurrences of
.BR \[rs]** .
.
.
.SS "Headers and footers"
.
There are three ways to define headers and footers:
.
.IP \(bu 3n
Use the strings
.BR LH ,
.BR CH ,
and
.B RH
to set the left, center, and right headers; use
.BR LF ,
.BR CF ,
and
.B RF
to set the left, center, and right footers.
This works best for documents that do not distinguish
between odd and even pages.
.
.IP \(bu
Use the
.B OH
and
.B EH
macros to define headers for the odd and even pages; and
.B OF
and
.B EF
macros to define footers for the odd and even pages.
This is more flexible than defining the individual strings.
The syntax for these macros is as follows:
.RS
.
.IP
.B ".OH '\fIleft\fP'\fIcenter\fP'\fIright\fP'"
.RE
.
.IP
You can replace the quote (') marks with any character not
appearing in the header or footer text.
.
.PP
You can also redefine the
.B PT
and
.B BT
macros to change the behavior of
the header and footer, respectively.
The header process also calls the (undefined)
.B HD
macro after
.B PT ;
you can define this macro if you need additional processing
after printing the header
(for example, to draw a line below the header).
.
.
.SS Margins
.
You control margins using a set of number registers.
The following table lists the register names and defaults:
.RS
.ne 8
.na
.TS
cb   s cb s s cb s cb s
afCW s l  s s l  s l  s.
Reg.	Definition	Effective	Default
_
PO	T{
Page offset (left margin)
T}	next page	1i
LL	T{
Line length
T}	next para.	6i
LT	T{
Header/footer length
T}	next para.	6i
HM	T{
Top (header) margin
T}	next page	1i
FM	T{
Bottom (footer) margin
T}	next page	1i
_
.TE
.RE
.ad
.
.PP
Note that there is no right margin setting.
The combination of page offset and line length
provide the information necessary to
derive the right margin.
.
.
.SS "Multiple columns"
.
The
.I ms
macros can set text in as many columns as will reasonably
fit on the page.
The following macros are available.
All of them force a page break if a multi-column mode is already set.
However, if the current mode is single-column, starting a multi-column
mode does
.I not
force a page break.
.
.TP
.B .1C
Single-column mode.
.
.TP
.B .2C
Two-column mode.
.
.TP
.BI ".MC [" width " [" gutter ]]
Multi-column mode.
If you specify no arguments, it is equivalent to the
.B 2C
macro.
Otherwise,
.I width
is the width of each column and
.I gutter
is the space between columns.
The
.B MINGW
number register is the default gutter width.
.
.
.SS "Creating a table of contents"
.
Wrap text that you want to appear in the
table of contents in
.B XS
and
.B XE
macros.
Use the
.B TC
macro to print the table of contents at the end of the document,
resetting the page number to\~\c
.B i
(Roman numeral\~1).
.
.PP
You can manually create a table of contents
by specifying a page number as the first argument to
.BR XS .
Add subsequent entries using the
.B XA
macro.
For example:
.RS
.
.PP
.ne 8
.nf
\&.XS 1
Introduction
\&.XA 2
A Brief History of the Universe
\&.XA 729
Details of Galactic Formation
\&.\|.\|.
\&.XE
.fi
.RE  
.
.LP  
Use the
.B PX  
macro to print a manually-generated table of contents
without resetting the page number.
.
.PP
If you give the argument
.B no
to either
.B PX
or   
.BR TC ,
.I groff
suppresses printing the title
specified by the
.B \[rs]*[TOC]  
string.
.
.
.SS "Fractional point sizes"
.
Traditionally, the
.I ms
macros only support integer values for the document's font size and
vertical spacing.
To overcome this restriction, values larger than or equal to 1000 are taken
as fractional values, multiplied by 1000.
For example, `.nr\~PS\~10250' sets the font size to 10.25 points.
.
.LP
The following four registers accept fractional point sizes:
.BR PS ,
.BR VS ,
.BR FPS ,
and
.BR FVS .
.
.LP
Due to backwards compatibility, the value of
.B VS
must be smaller than 40000 (this is 40.0 points).
.
.
.
.SH "DIFFERENCES FROM troff ms"
.
The
.I "groff ms"
macros are a complete re-implementation,
using no original AT&T code.
Since they take advantage of the extended features in
.IR groff ,
they cannot be used with AT&T
.IR troff .
Other differences include:
.
.IP \(bu 3n
The internals of
.I "groff ms"
differ from the internals of Unix
.IR ms . 
Documents that depend upon implementation details of Unix
.I ms
may not format properly with
.IR "groff ms" .
.
.IP \(bu
The error-handling policy of
.I "groff ms"
is to detect and report errors,
rather than silently to ignore them.
.
.IP \(bu
Bell Labs localisms are not implemented.
.
.IP \(bu
Berkeley localisms, in particular the
.B TM
and
.B CT
macros,
are not implemented.
.
.IP \(bu
.I "Groff ms"
does not work in compatibility mode (e.g., with the
.B \-C
option).
.
.IP \(bu
There is no support for typewriter-like devices.
.
.IP \(bu
.I "Groff ms"
does not provide cut marks.
.
.IP \(bu
Multiple line spacing is not supported
(use a larger vertical spacing instead).
.
.IP \(bu
Some Unix
.I ms
documentation says that the
.B CW
and
.B GW
number registers can be used to control the column width and
gutter width, respectively.
These number registers are not used in
.IR "groff ms" .
.
.IP \(bu
Macros that cause a reset
(paragraphs, headings, etc.\&)
may change the indent.
Macros that change the indent do not increment or decrement
the indent, but rather set it absolutely.
This can cause problems for documents that define
additional macros of their own.
The solution is to use not the
.B in
request but instead the
.B RS
and
.B RE
macros.
.
.IP \(bu
The number register
.B GS
is set to\~1 by the
.I "groff ms"
macros,
but is not used by the Unix
.I ms
macros.
Documents that need to determine whether
they are being formatted with Unix
.I ms
or
.I "groff ms"
should use this number register.
.
.IP \(bu
To make
.I "groff ms"
use the default page offset (which also specifies the left margin),
the
.B PO
number register must stay undefined until the first
.B ms
macro is evaluated.
This implies that
.B PO
should not be used early in the document, unless it is changed also:
Remember that accessing an undefined register automatically defines it.
.br
.ne 23
.
.
.SS Strings
.
You can redefine the following strings to adapt the
.I "groff ms"
macros to languages other than English:
.TS
center;
cb cb
afCW l .
String	Default Value
_
REFERENCES	References
ABSTRACT	ABSTRACT
TOC	Table of Contents
MONTH1	January
MONTH2	February
MONTH3	March
MONTH4	April
MONTH5	May
MONTH6	June
MONTH7	July
MONTH8	August
MONTH9	September
MONTH10	October
MONTH11	November
MONTH12	December
_
.TE
.
.PP
The
.B \[rs]*-
string produces an em dash \[em] like this.
.
.PP
Use
.B \[rs]*Q
and
.B \[rs]*U
to get a left and right typographer's quote,
respectively, in
.I troff
(and plain quotes in
.IR nroff ).

.
.
.SS Text Settings
.
The
.B FAM
string sets the default font family.
If this string is undefined at initialization,
it is set to Times.
.
.LP
The point size, vertical spacing, and inter-paragraph spacing for footnotes
are controlled by the number registers
.BR FPS ,
.BR FVS ,
and
.BR FPD ;
at initialization these are set to
.BR \[rs]n(PS-2 ,
.BR \[rs]n[FPS]+2 ,
and
.BR \[rs]n(PD/2 ,
respectively.
If any of these registers are defined before initialization,
the initialization macro does not change them.
.
.LP
The hyphenation flags (as set by the
.B hy
request) are set from the
.B HY
register;
the default is\~14.
.
.PP
Improved accent marks
(as originally defined in Berkeley's
.I ms
version)
are available by specifying the
.B AM
macro at the beginning of your document.
You can place an accent over most characters
by specifying the string defining the accent
directly after the character.
For example,
.B n\[rs]*~ 
produces an n with a tilde over it.
.
.
.
.SH "NAMING CONVENTIONS"
.
.
.LP
The following conventions are used for names of macros, strings and
number registers.
External names available to documents that use the
.I "groff ms"
macros contain only uppercase letters and digits.
.
.LP
Internally the macros are divided into modules;
naming conventions are as follows:
.
.IP \(bu 3n
Names used only within one module are of the form
.IB \%module * name\fR.
.
.IP \(bu
Names used outside the module in which they are defined are of the form
.IB \%module @ name\fR.
.
.IP \(bu
Names associated with a particular environment are of the form
.IB \%environment : name\fR;
these are used only within the
.B par
module.
.
.IP \(bu
.I name
does not have a module prefix.
.
.IP \(bu
Constructed names used to implement arrays are of the form
.IB \%array ! index\fR.
.
.PP
Thus the groff ms macros reserve the following names:
.
.IP \(bu 3n
Names containing the characters
.BR * ,
.BR @ ,
and\~\c
.BR : .
.
.IP \(bu
Names containing only uppercase letters and digits.
.
.
.
.SH FILES
.
.B @MACRODIR@/ms.tmac
(a wrapper file for
.BR s.tmac )
.br
.B @MACRODIR@/s.tmac
.
.
.
.SH "SEE ALSO"
.
.BR groff (@MAN1EXT@),
.BR @g@troff (@MAN1EXT@),
.BR @g@tbl (@MAN1EXT@),
.BR @g@pic (@MAN1EXT@),
.BR @g@eqn (@MAN1EXT@),
.BR @g@refer (@MAN1EXT@),
.I Groff: The GNU Implementation of troff
by Trent Fisher and Werner Lemberg.
.
.
.
.SH AUTHOR
.
Original manual page by James Clark
.IR "et al" ;
rewritten by Larry Kollar
(\fIlkollar@despammed.com\fR).
.
.cp \n[groff_ms_C]
.
.\" Local Variables:
.\" mode: nroff
.\" End: