summaryrefslogtreecommitdiffstats
path: root/contrib/groff/doc/groff-2
blob: d1f7f996eced52e02e57498eba9672e7e3450ddc (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
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
This is groff, produced by makeinfo version 4.2 from ./groff.texinfo.

This manual documents GNU `troff' version 1.18.

   Copyright (C) 1994-2000, 2001, 2002 Free Software Foundation, Inc.

     Permission is granted to copy, distribute and/or modify this
     document under the terms of the GNU Free Documentation License,
     Version 1.1 or any later version published by the Free Software
     Foundation; with no Invariant Sections, with the Front-Cover texts
     being `A GNU Manual," and with the Back-Cover Texts as in (a)
     below.  A copy of the license is included in the section entitled
     `GNU Free Documentation License."

     (a) The FSF's Back-Cover Text is: `You have freedom to copy and
     modify this GNU Manual, like GNU software.  Copies published by
     the Free Software Foundation raise funds for GNU development."
   
INFO-DIR-SECTION Miscellaneous
START-INFO-DIR-ENTRY
* Groff: (groff).               The GNU troff document formatting system.
END-INFO-DIR-ENTRY


File: groff,  Node: Man usage,  Next: Man font macros,  Prev: Man options,  Up: man

Usage
-----

   This section describes the available macros for manual pages.  For
further customization, put additional macros and requests into the file
`man.local' which is loaded immediately after the `man' package.

 - Macro: .TH title section [extra1 [extra2 [extra3]]]
     Set the title of the man page to TITLE and the section to SECTION,
     which must have a value between 1 and 8.  The value of SECTION may
     also have a string appended, e.g. `.pm', to indicate a specific
     subsection of the man pages.

     Both TITLE and SECTION are positioned at the left and right in the
     header line (with SECTION in parentheses immediately appended to
     TITLE.  EXTRA1 is positioned in the middle of the footer line.
     EXTRA2 is positioned at the left in the footer line (or at the
     left on even pages and at the right on odd pages if double-sided
     printing is active).  EXTRA3 is centered in the header line.

     For HTML output, headers and footers are completely suppressed.

     Additionally, this macro starts a new page; the new line number
     is 1 again (except if the `-rC1' option is given on the command
     line) - this feature is intended only for formatting multiple man
     pages; a single man page should contain exactly one `TH' macro at
     the beginning of the file.

 - Macro: .SH [heading]
     Set up an unnumbered section heading sticking out to the left.
     Prints out all the text following `SH' up to the end of the line
     (or the text in the next line if there is no argument to `SH') in
     bold face, one size larger than the base document size.
     Additionally, the left margin for the following text is reset to
     its default value.

 - Macro: .SS [heading]
     Set up an unnumbered (sub)section heading.  Prints out all the text
     following `SS' up to the end of the line (or the text in the next
     line if there is no argument to `SS') in bold face, at the same
     size as the base document size.  Additionally, the left margin for
     the following text is reset to its default value.

 - Macro: .TP [nnn]
     Set up an indented paragraph with label.  The indentation is set to
     NNN if that argument is supplied (the default unit is `n' if
     omitted), otherwise it is set to the default indentation value.

     The first line of text following this macro is interpreted as a
     string to be printed flush-left, as it is appropriate for a label.
     It is not interpreted as part of a paragraph, so there is no
     attempt to fill the first line with text from the following input
     lines.  Nevertheless, if the label is not as wide as the
     indentation, then the paragraph starts at the same line (but
     indented), continuing on the following lines.  If the label is
     wider than the indentation, then the descriptive part of the
     paragraph begins on the line following the label, entirely
     indented.  Note that neither font shape nor font size of the label
     is set to a default value; on the other hand, the rest of the text
     has default font settings.

 - Macro: .LP
 - Macro: .PP
 - Macro: .P
     These macros are mutual aliases.  Any of them causes a line break
     at the current position, followed by a vertical space downwards by
     the amount specified by the `PD' macro.  The font size and shape
     are reset to the default value (10pt roman if no `-rS' option is
     given on the command line).  Finally, the current left margin is
     restored.

 - Macro: .IP [designator [nnn]]
     Set up an indented paragraph, using DESIGNATOR as a tag to mark
     its beginning.  The indentation is set to NNN if that argument is
     supplied (default unit is `n'), otherwise the default indentation
     value is used.  Font size and face of the paragraph (but not the
     designator) are reset to their default values.  To start an
     indented paragraph with a particular indentation but without a
     designator, use `""' (two double quotes) as the first argument of
     `IP'.

     For example, to start a paragraph with bullets as the designator
     and 4 en indentation, write


          .IP \(bu 4


 - Macro: .HP [nnn]
     Set up a paragraph with hanging left indentation.  The indentation
     is set to NNN if that argument is supplied (default unit is `n'),
     otherwise the default indentation value is used.  Font size and
     face are reset to their default values.

 - Macro: .RS [nnn]
     Move the left margin to the right by the value NNN if specified
     (default unit is `n'); otherwise the default indentation value is
     used.  Calls to the `RS' macro can be nested.

 - Macro: .RE [nnn]
     Move the left margin back to level NNN; if no argument is given,
     it moves one level back.  The first level (i.e., no call to `RS'
     yet) has number 1, and each call to `RS' increases the level by 1.

   To summarize, the following macros cause a line break with the
insertion of vertical space (which amount can be changed with the `PD'
macro): `SH', `SS', `TP', `LP' (`PP', `P'), `IP', and `HP'.

   The macros `RS' and `RE' also cause a break but do not insert
vertical space.

   Finally, the macros `SH', `SS', `LP' (`PP', `P'), and `RS' reset the
indentation to its default value.


File: groff,  Node: Man font macros,  Next: Miscellaneous man macros,  Prev: Man usage,  Up: man

Macros to set fonts
-------------------

   The standard font is roman; the default text size is 10 point.  If
command line option `-rS=N' is given, use Npt as the default text size.

 - Macro: .SM [text]
     Set the text on the same line or the text on the next line in a
     font that is one point size smaller than the default font.

 - Macro: .SB [text]
     Set the text on the same line or the text on the next line in bold
     face font, one point size smaller than the default font.

 - Macro: .BI text
     Set its arguments alternately in bold face and italic.  Thus,


          .BI this "word and" that

     would set "this" and "that" in bold face, and "word and" in
     italics.

 - Macro: .IB text
     Set its arguments alternately in italic and bold face.

 - Macro: .RI text
     Set its arguments alternately in roman and italic.

 - Macro: .IR text
     Set its arguments alternately in italic and roman.

 - Macro: .BR text
     Set its arguments alternately in bold face and roman.

 - Macro: .RB text
     Set its arguments alternately in roman and bold face.

 - Macro: .B [text]
     Set TEXT in bold face.  If no text is present on the line where
     the macro is called, then the text of the next line appears in bold
     face.

 - Macro: .I [text]
     Set TEXT in italic.  If no text is present on the line where the
     macro is called, then the text of the next line appears in italic.


File: groff,  Node: Miscellaneous man macros,  Next: Predefined man strings,  Prev: Man font macros,  Up: man

Miscellaneous macros
--------------------

   The default indentation is 7.2 en for all output devices except for
`grohtml' which ignores indentation.

 - Macro: .DT
     Set tabs every 0.5 inches.  Since this macro is always executed
     during a call to the `TH' macro, it makes sense to call it only if
     the tab positions have been changed.

 - Macro: .PD [nnn]
     Adjust the empty space before a new paragraph (or section).  The
     optional argument gives the amount of space (default unit is `v');
     without parameter, the value is reset to its default value (1 line
     for TTY devices, 0.4v otherwise).

   This affects the macros `SH', `SS', `TP', `LP' (as well as `PP' and
`P'), `IP', and `HP'.


File: groff,  Node: Predefined man strings,  Next: Preprocessors in man pages,  Prev: Miscellaneous man macros,  Up: man

Predefined strings
------------------

   The following strings are defined:

 - String: \*[S]
     Switch back to the default font size.

 - String: \*[R]
     The `registered' sign.

 - String: \*[Tm]
     The `trademark' sign.

 - String: \*[lq]
 - String: \*[rq]
     Left and right quote.  This is equal to `\(lq' and `\(rq',
     respectively.


File: groff,  Node: Preprocessors in man pages,  Prev: Predefined man strings,  Up: man

Preprocessors in `man' pages
----------------------------

   If a preprocessor like `gtbl' or `geqn' is needed, it has become
common usage to make the first line of the man page look like this:


     '\" WORD

Note the single space character after the double quote.  WORD consists
of letters for the needed preprocessors: `e' for `geqn', `r' for
`grefer', `t' for `gtbl'.  Modern implementations of the `man' program
read this first line and automatically call the right preprocessor(s).


File: groff,  Node: mdoc,  Next: ms,  Prev: man,  Up: Macro Packages

`mdoc'
======

   See the `groff_mdoc(7)' man page (type `man groff_mdoc' at the
command line).


File: groff,  Node: ms,  Next: me,  Prev: mdoc,  Up: Macro Packages

`ms'
====

   The `-ms' macros are suitable for reports, letters, books, user
manuals, and so forth.  The package provides macros for cover pages,
section headings, paragraphs, lists, footnotes, pagination, and a table
of contents.

* Menu:

* ms Intro::
* General ms Structure::
* ms Document Control Registers::
* ms Cover Page Macros::
* ms Body Text::
* ms Page Layout::
* Differences from AT&T ms::


File: groff,  Node: ms Intro,  Next: General ms Structure,  Prev: ms,  Up: ms

Introduction to `ms'
--------------------

   The original `-ms' macros were included with AT&T `troff' as well as
the `man' macros.  While the `man' package is intended for brief
documents that can be read on-line as well as printed, the `ms' macros
are suitable for longer documents that are meant to be printed rather
than read on-line.

   The `ms' macro package included with `groff' is a complete,
bottom-up re-implementation.  Several macros (specific to AT&T or
Berkeley) are not included, while several new commands are.  *Note
Differences from AT&T ms::, for more information.


File: groff,  Node: General ms Structure,  Next: ms Document Control Registers,  Prev: ms Intro,  Up: ms

General structure of an `ms' document
-------------------------------------

   The `ms' macro package expects a certain amount of structure, but
not as much as packages such as `man' or `mdoc'.

   The simplest documents can begin with a paragraph macro (such as
`LP' or `PP'), and consist of text separated by paragraph macros or
even blank lines.  Longer documents have a structure as follows:

*Document type*
     If you invoke the `RP' (report) macro on the first line of the
     document, `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 `troff' are specific to AT&T or Berkeley, and are
     not supported in `groff'.

*Format and layout*
     By setting number registers, you can change your document's type
     (font and size), margins, spacing, headers and footers, and
     footnotes.  *Note ms Document Control Registers::, for more
     details.

*Cover page*
     A cover page consists of a title, the author's name and
     institution, an abstract, and the date.  (1) (*note General ms
     Structure-Footnote-1::) *Note ms Cover Page Macros::, for more
     details.

*Body*
     Following the cover page is your document.  You can use the `ms'
     macros to write reports, letters, books, and so forth.  The
     package is designed for structured documents, consisting of
     paragraphs interspersed with headings and augmented by lists,
     footnotes, tables, and other common constructs.  *Note ms Body
     Text::, for more details.

*Table of contents*
     Longer documents usually include a table of contents, which you
     can invoke by placing the `TC' macro at the end of your document.
     The `ms' macros have minimal indexing facilities, consisting of the
     `IX' macro, which prints an entry on standard error.  Printing the
     table of contents at the end is necessary since `groff' is a
     single-pass text formatter, thus it cannot determine the page
     number of each section until that section has actually been set
     and printed.  Since `ms' output is intended for hardcopy, you can
     manually relocate the pages containing the table of contents
     between the cover page and the body text after printing.


File: groff,  Node: General ms Structure-Footnotes,  Up: General ms Structure

   (1) Actually, only the title is required.


File: groff,  Node: ms Document Control Registers,  Next: ms Cover Page Macros,  Prev: General ms Structure,  Up: ms

Document control registers
--------------------------

   The following is a list of document control number registers.  For
the sake of consistency, set registers related to margins at the
beginning of your document, or just after the `RP' macro.  You can set
other registers later in your document, but you should keep them
together at the beginning to make them easy to find and edit as
necessary.

Margin Settings
...............

 - Register: \n[PO]
     Defines the page offset (i.e. the left margin).  There is no
     explicit right margin setting; the combination of the `PO' and
     `LL' registers implicitly define the right margin width.

     Effective: next page.

     Default value: 1i.

 - Register: \n[LL]
     Defines the line length (i.e. the width of the body text).

     Effective: next paragraph.

     Default: 6i.

 - Register: \n[LT]
     Defines the title length (i.e. the header and footer width).  This
     is usually the same as `LL', but not necessarily.

     Effective: next paragraph.

     Default: 6i.

 - Register: \n[HM]
     Defines the header margin height at the top of the page.

     Effective: next page.

     Default: 1i.

 - Register: \n[FM]
     Defines the footer margin height at the bottom of the page.

     Effective: next page.

     Default: 1i.

Text Settings
.............

 - Register: \n[PS]
     Defines the point size of the body text.

     Effective: next paragraph.

     Default: 10p.

 - Register: \n[VS]
     Defines the space between lines (line height plus leading).

     Effective: next paragraph.

     Default: 12p.

Paragraph Settings
..................

 - Register: \n[PI]
     Defines the initial indent of a `.PP' paragraph.

     Effective: next paragraph.

     Default: 5n.

 - Register: \n[PD]
     Defines the space between paragraphs.

     Effective: next paragraph.

     Default: 0.3v.

 - Register: \n[QI]
     Defines the indent on both sides of a quoted (`.QP') paragraph.

     Effective: next paragraph.

     Default: 5n.

Footnote Settings
.................

 - Register: \n[FL]
     Defines the length of a footnote.

     Effective: next footnote.

     Default: `\n[LL]' * 5 / 6.

 - Register: \n[FI]
     Defines the footnote indent.

     Effective: next footnote.

     Default: 2n.

 - Register: \n[FF]
     The footnote format:
    `0'
          Prints the footnote number as a superscript; indents the
          footnote (default).

    `1'
          Prints the number followed by a period (like 1.)  and indents
          the footnote.

    `2'
          Like 1, without an indent.

    `3'
          Like 1, but prints the footnote number as a hanging paragraph.

     Effective: next footnote.

     Default: 0.

Miscellaneous Number Registers
..............................

 - Register: \n[MINGW]
     Defines the minimum width between columns in a multi-column
     document.

     Effective: next page.

     Default: 2n.


File: groff,  Node: ms Cover Page Macros,  Next: ms Body Text,  Prev: ms Document Control Registers,  Up: ms

Cover page macros
-----------------

   Use the following macros to create a cover page for your document in
the order shown.

 - Macro: .RP [`no']
     Specifies the report format for your document.  The report format
     creates a separate cover page.  The default action (no `.RP'
     macro) is to print a subset of the cover page on page 1 of your
     document.

     If you use the word `no' as an optional argument, `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.

 - Macro: .DA [...]
     (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 `nroff'.

 - Macro: .ND [...]
     (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 `troff'.

 - Macro: .TL
     Specifies the document title.  `groff' collects text following the
     `.TL' macro into the title, until reaching the author name or
     abstract.

 - Macro: .AU
     Specifies the author's name, which appears on the line (or lines)
     immediately following.  You can specify multiple authors as
     follows:


          .AU
          John Doe
          .AI
          University of West Bumblefuzz
          .AU
          Martha Buck
          .AI
          Monolithic Corporation
          
          ...


 - Macro: .AI
     Specifies the author's institution.  You can specify multiple
     institutions in the same way that you specify multiple authors.

 - Macro: .AB [`no']
     Begins the abstract.  The default is to print the word ABSTRACT,
     centered and in italics, above the text of the abstract.  The word
     `no' as an optional argument suppresses this heading.

 - Macro: .AE
     End the abstract.

   The following is example mark-up for a title page.


     .RP
     .TL
     The Inevitability of Code Bloat
     in Commercial and Free Software
     .AU
     J. Random Luser
     .AI
     University of West Bumblefuzz
     .AB
     This report examines the long-term growth
     of the code bases in two large, popular software
     packages; the free Emacs and the commercial
     Microsoft Word.
     While differences appear in the type or order
     of features added, due to the different
     methodologies used, the results are the same
     in the end.
     .PP
     The free software approach is shown to be
     superior in that while free software can
     become as bloated as commercial offerings,
     free software tends to have fewer serious
     bugs and the added features are in line with
     user demand.
     .AE
     
     ... the rest of the paper follows ...


File: groff,  Node: ms Body Text,  Next: ms Page Layout,  Prev: ms Cover Page Macros,  Up: ms

Body text
---------

   This section describes macros used to mark up the body of your
document.  Examples include paragraphs, sections, and other groups.

* Menu:

* Paragraphs in ms::
* Headings in ms::
* Highlighting in ms::
* Lists in ms::
* Indents in ms::
* Tabstops in ms::
* ms Displays and Keeps::
* ms Insertions::
* Example multi-page table::
* ms Footnotes::


File: groff,  Node: Paragraphs in ms,  Next: Headings in ms,  Prev: ms Body Text,  Up: ms Body Text

Paragraphs
..........

   The following paragraph types are available.

 - Macro: .PP
     Sets a paragraph with an initial indent.

 - Macro: .LP
     Sets a paragraph with no initial indent.

 - Macro: .QP
     Sets a paragraph that is indented at both left and right margins.
     The effect is identical to the HTML `<BLOCKQUOTE>' element.  The
     next paragraph or heading returns margins to normal.

 - Macro: .XP
     Sets a paragraph whose lines are indented, except for the first
     line.  This is a Berkeley extension.

   The following markup uses all four paragraph macros.


     .NH 2
     Cases used in the study
     .LP
     The following software and versions were
     considered for this report.
     .PP
     For commercial software, we chose
     .B "Microsoft Word for Windows" ,
     starting with version 1.0 through the
     current version (Word 2000).
     .PP
     For free software, we chose
     .B Emacs ,
     from its first appearance as a standalone
     editor through the current version (v20).
     See [Bloggs 2002] for details.
     .QP
     Franklin's Law applied to software:
     software expands to outgrow both
     RAM and disk space over time.
     .LP
     Bibliography:
     .XP
     Bloggs, Joseph R.,
     .I "Everyone's a Critic" ,
     Underground Press, March 2002.
     A definitive work that answers all questions
     and criticisms about the quality and usability of
     free software.


File: groff,  Node: Headings in ms,  Next: Highlighting in ms,  Prev: Paragraphs in ms,  Up: ms Body Text

Headings
........

   Use headings to create a hierarchical structure for your document.
The `ms' macros print headings in *bold*, using the same font family
and point size as the body text.

   The following describes the heading macros:

 - Macro: .NH curr-level
 - Macro: .NH S level0 ...
     Numbered heading.  The argument is either a numeric argument to
     indicate the level of the heading, or the letter `S' followed by
     numeric arguments to set the heading level explicitly.

     If you specify heading levels out of sequence, such as invoking
     `.NH 3' after `.NH 1', `groff' prints a warning on standard error.

 - Macro: .SH
     Unnumbered subheading.


File: groff,  Node: Highlighting in ms,  Next: Lists in ms,  Prev: Headings in ms,  Up: ms Body Text

Highlighting
............

   The `ms' macros provide a variety of methods to highlight or
emphasize text:

 - Macro: .B [txt [post [pre]]]
     Sets its first argument in *bold type*.  If you specify a second
     argument, `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 *before* the first argument.  For example,


          .B foo ) (

     prints (*foo*).

     If you give this macro no arguments, `groff' prints all text
     following in bold until the next highlighting, paragraph, or
     heading macro.

 - Macro: .R [txt [post [pre]]]
     Sets its first argument in roman (or regular) type.  It operates
     similarly to the `B' macro otherwise.

 - Macro: .I [txt [post [pre]]]
     Sets its first argument in _italic type_.  It operates similarly
     to the `B' macro otherwise.

 - Macro: .CW [txt [post [pre]]]
     Sets its first argument in a `constant width face'.  It operates
     similarly to the `B' macro otherwise.

 - Macro: .BI [txt [post [pre]]]
     Sets its first argument in bold italic type.  It operates
     similarly to the `B' macro otherwise.

 - Macro: .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 (`\0').

 - Macro: .UL [txt [post]]
     Prints its first argument with an underline.  If you specify a
     second argument, `groff' prints it in the previous font after the
     underlined text, with no intervening space.

 - Macro: .LG
     Prints all text following in larger type (two 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.

 - Macro: .SM
     Prints all text following in smaller type (two 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.

 - Macro: .NL
     Prints all text following in the normal point size (that is, the
     value of the `PS' register).


File: groff,  Node: Lists in ms,  Next: Indents in ms,  Prev: Highlighting in ms,  Up: ms Body Text

Lists
.....

   The `.IP' macro handles duties for all lists.

 - Macro: .IP [marker [width]]
     The MARKER is usually a bullet glyph (`\[bu]') for unordered
     lists, a number (or auto-incrementing number register) for
     numbered lists, or a word or phrase for indented (glossary-style)
     lists.

     The WIDTH specifies the indent for the body of each list item; its
     default unit is `n'.  Once specified, the indent remains the same
     for all list items in the document until specified again.

   The following is an example of a bulleted list.


     A bulleted list:
     .IP \[bu] 2
     lawyers
     .IP \[bu]
     guns
     .IP \[bu]
     money

   Produces:


     A bulleted list:
     
     o lawyers
     
     o guns
     
     o money


   The following is an example of a numbered list.


     .nr step 1 1
     A numbered list:
     .IP \n[step] 3
     lawyers
     .IP \n+[step]
     guns
     .IP \n+[step]
     money

   Produces:


     A numbered list:
     
     1. lawyers
     
     2. guns
     
     3. money

   Note the use of the auto-incrementing number register in this
example.


   The following is an example of a glossary-style list.


     A glossary-style list:
     .IP lawyers 0.4i
     Two or more attorneys.
     .IP guns
     Firearms, preferably
     large-caliber.
     .IP money
     Gotta pay for those
     lawyers and guns!

   Produces:


     A glossary-style list:
     
     lawyers
           Two or more attorneys.
     
     guns  Firearms, preferably large-caliber.
     
     money
           Gotta pay for those lawyers and guns!

   In the last example, the `IP' macro places the definition on the
same line as the term if it has enough space; otherwise, it breaks to
the next line and starts the definition below the term.  This may or
may not be the effect you want, especially if some of the definitions
break and some do not.  The following examples show two possible ways
to force a break.

   The first workaround uses the `br' request to force a break after
printing the term or label.


     A glossary-style list:
     .IP lawyers 0.4i
     Two or more attorneys.
     .IP guns
     .br
     Firearms, preferably large-caliber.
     .IP money
     Gotta pay for those lawyers and guns!


   The second workaround uses the `\p' escape to force the break.  Note
the space following the escape; this is important.  If you omit the
space, `groff' prints the first word on the same line as the term or
label (if it fits) *then* breaks the line.


     A glossary-style list:
     .IP lawyers 0.4i
     Two or more attorneys.
     .IP guns
     \p Firearms, preferably large-caliber.
     .IP money
     Gotta pay for those lawyers and guns!


   To set nested lists, use the `RS' and `RE' macros.  *Note Indents in
ms::, for more information.

   For example:


     .IP \[bu] 2
     Lawyers:
     .RS
     .IP \[bu]
     Dewey,
     .IP \[bu]
     Cheatham,
     .IP \[bu]
     and Howe.
     .RE
     .IP \[bu]
     Guns

   Produces:


     o Lawyers:
     
       o  Dewey,
     
       o  Cheatham,
     
       o  and Howe.
     
     o Guns


File: groff,  Node: Indents in ms,  Next: Tabstops in ms,  Prev: Lists in ms,  Up: ms Body Text

Indents
.......

   In many situations, you may need to indent a section of text while
still wrapping and filling.  *Note Lists in ms::, for an example of
nested lists.

 - Macro: .RS
 - Macro: .RE
     These macros begin and end an indented section.  The `PI' register
     controls the amount of indent, allowing the indented text to line
     up under hanging and indented paragraphs.

   *Note ms Displays and Keeps::, for macros to indent and turn off
filling.


File: groff,  Node: Tabstops in ms,  Next: ms Displays and Keeps,  Prev: Indents in ms,  Up: ms Body Text

Tab Stops
.........

   Use the `ta' request to define tab stops as needed.  *Note Tabs and
Fields::.

 - Macro: .TA
     Use this macro to reset the tab stops to the default for `ms'
     (every 5n).  You can redefine the `TA' macro to create a different
     set of default tab stops.


File: groff,  Node: ms Displays and Keeps,  Next: ms Insertions,  Prev: Tabstops in ms,  Up: ms Body Text

Displays and keeps
..................

   Use displays to show text-based examples or figures (such as code
listings).

   Displays turn off filling, so lines of code are displayed as-is
without inserting `br' requests in between each line.  Displays can be
"kept" on a single page, or allowed to break across pages.

 - Macro: .DS L
 - Macro: .LD
 - Macro: .DE
     Left-justified display.  The `.DS L' call generates a page break,
     if necessary, to keep the entire display on one page.  The `LD'
     macro allows the display to break across pages.  The `DE' macro
     ends the display.

 - Macro: .DS I
 - Macro: .ID
 - Macro: .DE
     Indents the display as defined by the `DI' register.  The `.DS I'
     call generates a page break, if necessary, to keep the entire
     display on one page.  The `ID' macro allows the display to break
     across pages.  The `DE' macro ends the display.

 - Macro: .DS B
 - Macro: .BD
 - Macro: .DE
     Sets a block-centered display: the entire display is
     left-justified, but indented so that the longest line in the
     display is centered on the page.  The `.DS B' call generates a
     page break, if necessary, to keep the entire display on one page.
     The `BD' macro allows the display to break across pages.  The `DE'
     macro ends the display.

 - Macro: .DS C
 - Macro: .CD
 - Macro: .DE
     Sets a centered display: each line in the display is centered.
     The `.DS C' call generates a page break, if necessary, to keep the
     entire display on one page.  The `CD' macro allows the display to
     break across pages.  The `DE' macro ends the display.

 - Macro: .DS R
 - Macro: .RD
 - Macro: .DE
     Right-justifies each line in the display.  The `.DS R' call
     generates a page break, if necessary, to keep the entire display
     on one page.  The `RD' macro allows the display to break across
     pages.  The `DE' macro ends the display.


   On occasion, you may want to "keep" other text together on a page.
For example, you may want to keep two paragraphs together, or a
paragraph that refers to a table (or list, or other item) immediately
following.  The `ms' macros provide the `KS' and `KE' macros for this
purpose.

 - Macro: .KS
 - Macro: .KE
     The `KS' macro begins a block of text to be kept on a single page,
     and the `KE' macro ends the block.

 - Macro: .KF
 - Macro: .KE
     Specifies a "floating keep"; if the keep cannot fit on the current
     page, `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
     `bp' request or by reaching the end of the page, `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.

   You can also use the `ne' request to force a page break if there is
not enough vertical space remaining on the page.


   Use the following macros to draw a box around a section of text
(such as a display).

 - Macro: .B1
 - Macro: .B2
     Marks the beginning and ending of text that is to have a box drawn
     around it.  The `B1' macro begins the box; the `B2' macro ends it.
     Text in the box is automatically placed in a diversion (keep).


File: groff,  Node: ms Insertions,  Next: Example multi-page table,  Prev: ms Displays and Keeps,  Up: ms Body Text

Tables, figures, equations, and references
..........................................

   The `ms' macros support the standard `groff' preprocessors: `tbl',
`pic', `eqn', and `refer'.  You mark text meant for preprocessors by
enclosing it in pairs of tags as follows.

 - Macro: .TS [`H']
 - Macro: .TE
     Denotes a table, to be processed by the `tbl' preprocessor.  The
     optional argument `H' to `TS' instructs `groff' to create a
     running header with the information up to the `TH' macro.  `groff'
     prints the header at the beginning of the table; if the table runs
     onto another page, `groff' prints the header on the next page as
     well.

 - Macro: .PS
 - Macro: .PE
     Denotes a graphic, to be processed by the `pic' preprocessor.  You
     can create a `pic' file by hand, using the AT&T `pic' manual
     available on the Web as a reference, or by using a graphics
     program such as `xfig'.

 - Macro: .EQ [align]
 - Macro: .EN
     Denotes an equation, to be processed by the `eqn' preprocessor.
     The optional ALIGN argument can be `C', `L', or `I' to center (the
     default), left-justify, or indent the equation.

 - Macro: .[
 - Macro: .]
     Denotes a reference, to be processed by the `refer' preprocessor.
     The GNU `refer(1)' man page provides a comprehensive reference to
     the preprocessor and the format of the bibliographic database.

* Menu:

* Example multi-page table::


File: groff,  Node: Example multi-page table,  Next: ms Footnotes,  Prev: ms Insertions,  Up: ms Body Text

An example multi-page table
...........................

   The following is an example of how to set up a table that may print
across two or more pages.


     .TS H
     allbox expand;
     cb | cb .
     Text      ...of heading...
     _
     .TH
     .T&
     l | l .
     ... the rest of the table follows...
     .CW
     .TE


File: groff,  Node: ms Footnotes,  Prev: Example multi-page table,  Up: ms Body Text

Footnotes
.........

   The `ms' macro package has a flexible footnote system.  You can
specify either numbered footnotes or symbolic footnotes (that is, using
a marker such as a dagger symbol).

 - String: \*[*]
     Specifies the location of a numbered footnote marker in the text.

 - Macro: .FS
 - Macro: .FE
     Specifies the text of the footnote.  The default action is to
     create a numbered footnote; you can create a symbolic footnote by
     specifying a "mark" glyph (such as `\[dg]' for the dagger glyph)
     in the body text and as an argument to the `FS' macro, followed by
     the text of the footnote and the `FE' macro.

   You can control how `groff' prints footnote numbers by changing the
value of the `FF' register.  *Note ms Document Control Registers::.


File: groff,  Node: ms Page Layout,  Next: Differences from AT&T ms,  Prev: ms Body Text,  Up: ms

Page layout
-----------

   The default output from the `ms' macros provides a minimalist page
layout: it prints a single column, with the page number centered at the
top of each page.  It prints no footers.

   You can change the layout by setting the proper number registers and
strings.

* Menu:

* ms Headers and Footers::
* ms Margins::
* ms Multiple Columns::
* ms TOC::
* ms Strings and Special Characters::


File: groff,  Node: ms Headers and Footers,  Next: ms Margins,  Prev: ms Page Layout,  Up: ms Page Layout

Headers and footers
...................

   For documents that do not distinguish between odd and even pages,
set the following strings:

 - String: \*[LH]
 - String: \*[CH]
 - String: \*[RH]
     Sets the left, center, and right headers.

 - String: \*[LF]
 - String: \*[CF]
 - String: \*[RF]
     Sets the left, center, and right footers.


   For documents that need different information printed in the even
and odd pages, use the following macros:

 - Macro: .OH 'left'center'right'
 - Macro: .EH 'left'center'right'
 - Macro: .OF 'left'center'right'
 - Macro: .EF 'left'center'right'
     The `OH' and `EH' macros define headers for the odd and even pages;
     the `OF' and `EF' macros define footers for the odd and even pages.
     This is more flexible than defining the individual strings.

     You can replace the quote (`'') marks with any character not
     appearing in the header or footer text.


File: groff,  Node: ms Margins,  Next: ms Multiple Columns,  Prev: ms Headers and Footers,  Up: ms Page Layout

Margins
.......

   You control margins using a set of number registers.  *Note ms
Document Control Registers::, for details.


File: groff,  Node: ms Multiple Columns,  Next: ms TOC,  Prev: ms Margins,  Up: ms Page Layout

Multiple columns
................

   The `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 *not*
force a page break.

 - Macro: .1C
     Single-column mode.

 - Macro: .2C
     Two-column mode.

 - Macro: .MC [width [gutter]]
     Multi-column mode.  If you specify no arguments, it is equivalent
     to the `2C' macro.  Otherwise, WIDTH is the width of each column
     and GUTTER is the space between columns.  The `MINGW' number
     register controls the default gutter width.


File: groff,  Node: ms TOC,  Next: ms Strings and Special Characters,  Prev: ms Multiple Columns,  Up: ms Page Layout

Creating a table of contents
............................

   The facilities in the `ms' macro package for creating a table of
contents are semi-automated at best.  Assuming that you want the table
of contents to consist of the document's headings, you need to repeat
those headings wrapped in `XS' and `XE' macros.

 - Macro: .XS [page]
 - Macro: .XA [page]
 - Macro: .XE
     These macros define a table of contents or an individual entry in
     the table of contents, depending on their use.  The macros are
     very simple; they cannot indent a heading based on its level.  The
     easiest way to work around this is to add tabs to the table of
     contents string.  The following is an example:


          .NH 1
          Introduction
          .XS
          Introduction
          .XE
          .LP
          ...
          .CW
          .NH 2
          Methodology
          .XS
          	Methodology
          .XE
          .LP
          ...

     You can manually create a table of contents by beginning with the
     `XS' macro for the first entry, specifying the page number for
     that entry as the argument to `XS'.  Add subsequent entries using
     the `XA' macro, specifying the page number for that entry as the
     argument to `XA'.  The following is an example:


          .XS 1
          Introduction
          .XA 2
          A Brief History of the Universe
          .XA 729
          Details of Galactic Formation
          ...
          .XE


 - Macro: .TC [`no']
     Prints the table of contents on a new page, setting the page
     number to *i* (Roman numeral one).  You should usually place this
     macro at the end of the file, since `groff' is a single-pass
     formatter and can only print what has been collected up to the
     point that the `TC' macro appears.

     The optional argument `no' suppresses printing the title specified
     by the string register `TOC'.

 - Macro: .PX [`no']
     Prints the table of contents on a new page, using the current page
     numbering sequence.  Use this macro to print a manually-generated
     table of contents at the beginning of your document.

     The optional argument `no' suppresses printing the title specified
     by the string register `TOC'.

   The `Groff and Friends HOWTO' includes a `sed' script that
automatically inserts `XS' and `XE' macro entries after each heading in
a document.

   Altering the `NH' macro to automatically build the table of contents
is perhaps initially more difficult, but would save a great deal of
time in the long run if you use `ms' regularly.


File: groff,  Node: ms Strings and Special Characters,  Prev: ms TOC,  Up: ms Page Layout

Strings and Special Characters
..............................

   The `ms' macros provide the following predefined strings.  You can
change the string definitions to help in creating documents in
languages other than English.

 - String: \*[REFERENCES]
     Contains the string printed at the beginning of the references
     (bibliography) page.  The default is `References'.

 - String: \*[ABSTRACT]
     Contains the string printed at the beginning of the abstract.  The
     default is `ABSTRACT'.

 - String: \*[TOC]
     Contains the string printed at the beginning of the table of
     contents.

 - String: \*[MONTH1]
 - String: \*[MONTH2]
 - String: \*[MONTH3]
 - String: \*[MONTH4]
 - String: \*[MONTH5]
 - String: \*[MONTH6]
 - String: \*[MONTH7]
 - String: \*[MONTH8]
 - String: \*[MONTH9]
 - String: \*[MONTH10]
 - String: \*[MONTH11]
 - String: \*[MONTH12]
     Prints the full name of the month in dates.  The default is
     `January', `February', etc.

   The following special characters are available(1) (*note ms Strings
and Special Characters-Footnote-1::):

 - String: \*[-]
     Prints an em dash.

 - String: \*[*Q]
 - String: \*[*U]
     Prints typographer's quotes in troff, plain quotes in nroff.  `*Q'
     is the left quote and `*U' is the right quote.

   Improved accent marks are available in the `ms' macros.

 - Macro: .AM
     Specify this macro at the beginning of your document to enable
     extended accent marks and special characters.  This is a Berkeley
     extension.

     To use the accent marks, place them *after* the character being
     accented.

   The following accent marks are available after invoking the `AM'
macro:

 - String: \*[']
     Acute accent.

 - String: \*[`]
     Grave accent.

 - String: \*[^]
     Circumflex.

 - String: \*[,]
     Cedilla.

 - String: \*[~]
     Tilde.

 - String: \*[:]
     Umlaut.

 - String: \*[v]
     Hacek.

 - String: \*[_]
     Macron (overbar).

 - String: \*[.]
     Underdot.

 - String: \*[o]
     Ring above.

   The following are standalone characters available after invoking the
`AM' macro:

 - String: \*[?]
     Upside-down question mark.

 - String: \*[!]
     Upside-down exclamation point.

 - String: \*[8]
     German ss ligature.

 - String: \*[3]
     Yogh.

 - String: \*[Th]
     Uppercase thorn.

 - String: \*[th]
     Lowercase thorn.

 - String: \*[D-]
     Uppercase eth.

 - String: \*[d-]
     Lowercase eth.

 - String: \*[q]
     Hooked o.

 - String: \*[ae]
     Lowercase ae ligature.

 - String: \*[Ae]
     Uppercase AE ligature.


File: groff,  Node: ms Strings and Special Characters-Footnotes,  Up: ms Strings and Special Characters

   (1) For an explanation what special characters are see *Note Special
Characters::.


File: groff,  Node: Differences from AT&T ms,  Prev: ms Page Layout,  Up: ms

Differences from AT&T `ms'
--------------------------

   This section lists the (minor) differences between the `groff -ms'
macros and AT&T `troff -ms' macros.

* Menu:

* Missing ms Macros::
* Additional ms Macros::


File: groff,  Node: Missing ms Macros,  Next: Additional ms Macros,  Prev: Differences from AT&T ms,  Up: Differences from AT&T ms

`troff' macros not appearing in `groff'
.......................................

   Macros missing from `groff -ms' are cover page macros specific to
Bell Labs.  The macros known to be missing are:

`.TM'
     Technical memorandum; a cover sheet style

`.IM'
     Internal memorandum; a cover sheet style

`.MR'
     Memo for record; a cover sheet style

`.MF'
     Memo for file; a cover sheet style

`.EG'
     Engineer's notes; a cover sheet style

`.TR'
     Computing Science Tech Report; a cover sheet style

`.OK'
     Other keywords

`.CS'
     Cover sheet information

`.MH'
     A cover sheet macro


File: groff,  Node: Additional ms Macros,  Prev: Missing ms Macros,  Up: Differences from AT&T ms

`groff' macros not appearing in AT&T `troff'
............................................

   The `groff -ms' macros have a few minor extensions compared to the
AT&T `troff -ms' macros.

 - Macro: .AM
     Improved accent marks.  *Note ms Strings and Special Characters::,
     for details.

 - Macro: .DS I
     Indented display.  The default behavior of AT&T `troff -ms' was to
     indent; the `groff' default prints displays flush left with the
     body text.

 - Macro: .CW
     Print text in `constant width' (Courier) font.

 - Macro: .IX
     Indexing term (printed on standard error).  You can write a script
     to capture and process an index generated in this manner.


   The following additional number registers appear in `groff -ms':

 - Register: \n[MINGW]
     Specifies a minimum space between columns (for multi-column
     output); this takes the place of the `GW' register that was
     documented but apparently not implemented in AT&T `troff'.


   Several new string registers are available as well.  You can change
these to handle (for example) the local language.  *Note ms Strings and
Special Characters::, for details.


File: groff,  Node: me,  Next: mm,  Prev: ms,  Up: Macro Packages

`me'
====

   See the `meintro.me' and `meref.me' documents in groff's `doc'
directory.


File: groff,  Node: mm,  Prev: me,  Up: Macro Packages

`mm'
====

   See the `groff_mm(7)' man page (type `man groff_mm' at the command
line).


File: groff,  Node: gtroff Reference,  Next: Preprocessors,  Prev: Macro Packages,  Up: Top

`gtroff' Reference
******************

   This chapter covers *all* of the facilities of `gtroff'.  Users of
macro packages may skip it if not interested in details.

* Menu:

* Text::
* Input Conventions::
* Measurements::
* Expressions::
* Identifiers::
* Embedded Commands::
* Registers::
* Manipulating Filling and Adjusting::
* Manipulating Hyphenation::
* Manipulating Spacing::
* Tabs and Fields::
* Character Translations::
* Troff and Nroff Mode::
* Line Layout::
* Line Control::
* Page Layout::
* Page Control::
* Fonts::
* Sizes::
* Strings::
* Conditionals and Loops::
* Writing Macros::
* Page Motions::
* Drawing Requests::
* Traps::
* Diversions::
* Environments::
* Suppressing output::
* Colors::
* I/O::
* Postprocessor Access::
* Miscellaneous::
* Gtroff Internals::
* Debugging::
* Implementation Differences::


File: groff,  Node: Text,  Next: Input Conventions,  Prev: gtroff Reference,  Up: gtroff Reference

Text
====

   `gtroff' input files contain text with control commands interspersed
throughout.  But, even without control codes, `gtroff' still does
several things with the input text:

   * filling and adjusting

   * adding additional space after sentences

   * hyphenating

   * inserting implicit line breaks

* Menu:

* Filling and Adjusting::
* Hyphenation::
* Sentences::
* Tab Stops::
* Implicit Line Breaks::


File: groff,  Node: Filling and Adjusting,  Next: Hyphenation,  Prev: Text,  Up: Text

Filling and Adjusting
---------------------

   When `gtroff' reads text, it collects words from the input and fits
as many of them together on one output line as it can.  This is known as
"filling".

   Once `gtroff' has a "filled" line, it tries to "adjust" it.  This
means it widens the spacing between words until the text reaches the
right margin (in the default adjustment mode).  Extra spaces between
words are preserved, but spaces at the end of lines are ignored.
Spaces at the front of a line cause a "break" (breaks are explained in
*Note Implicit Line Breaks::).

   *Note Manipulating Filling and Adjusting::.


File: groff,  Node: Hyphenation,  Next: Sentences,  Prev: Filling and Adjusting,  Up: Text

Hyphenation
-----------

   Since the odds are not great for finding a set of words, for every
output line, which fit nicely on a line without inserting excessive
amounts of space between words, `gtroff' hyphenates words so that it
can justify lines without inserting too much space between words.  It
uses an internal hyphenation algorithm (a simplified version of the
algorithm used within TeX) to indicate which words can be hyphenated
and how to do so.  When a word is hyphenated, the first part of the
word is added to the current filled line being output (with an attached
hyphen), and the other portion is added to the next line to be filled.

   *Note Manipulating Hyphenation::.


File: groff,  Node: Sentences,  Next: Tab Stops,  Prev: Hyphenation,  Up: Text

Sentences
---------

   Although it is often debated, some typesetting rules say there
should be different amounts of space after various punctuation marks.
For example, the `Chicago typsetting manual' says that a period at the
end of a sentence should have twice as much space following it as would
a comma or a period as part of an abbreviation.

   `gtroff' does this by flagging certain characters (normally `!',
`?', and `.') as "end-of-sentence" characters.  When `gtroff'
encounters one of these characters at the end of a line, it appends a
normal space followed by a "sentence space" in the formatted output.
(This justifies one of the conventions mentioned in *Note Input
Conventions::.)

   In addition, the following characters and symbols are treated
transparently while handling end-of-sentence characters: `"', `'', `)',
`]', `*', `\[dg]', and `\[rq]'.

   See the `cflags' request in *Note Using Symbols::, for more details.

   To prevent the insertion of extra space after an end-of-sentence
character (at the end of a line), append `\&'.

OpenPOWER on IntegriCloud