summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-tumbleweed/man1/groff.1
blob: 030cc4546d103d99b4c3c9c5c1db7d195be4c4f6 (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
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
.TH groff 1 "4 October 2023" "groff 1.23.0"
.SH Name
groff \- front end to the GNU
.I roff
document formatting system
.
.
.\" ====================================================================
.\" Legal Terms
.\" ====================================================================
.\"
.\" Copyright (C) 1989-2022 Free Software Foundation, Inc.
.\"
.\" This file is part of groff, the GNU roff type-setting system.
.\"
.\" Permission is granted to copy, distribute and/or modify this
.\" document under the terms of the GNU Free Documentation License,
.\" Version 1.3 or any later version published by the Free Software
.\" Foundation; with no Invariant Sections, with no Front-Cover Texts,
.\" and with no Back-Cover Texts.
.\"
.\" A copy of the Free Documentation License is included as a file
.\" called FDL in the main directory of the groff source package.
.
.
.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
.do nr *groff_groff_1_man_C \n[.cp]
.cp 0
.
.\" Define fallback for groff 1.23's MR macro if the system lacks it.
.nr do-fallback 0
.if !\n(.f           .nr do-fallback 1 \" mandoc
.if  \n(.g .if !d MR .nr do-fallback 1 \" older groff
.if !\n(.g           .nr do-fallback 1 \" non-groff *roff
.if \n[do-fallback]  \{\
.  de MR
.    ie \\n(.$=1 \
.      I \%\\$1
.    el \
.      IR \%\\$1 (\\$2)\\$3
.  .
.\}
.rr do-fallback
.
.\" Define a string for the TeX logo.
.ie t .ds TeX T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
.el   .ds TeX TeX
.
.\" ====================================================================
.SH Synopsis
.\" ====================================================================
.
.SY groff
.RB [ \-abcCeEgGijklNpRsStUVXzZ ]
.RB [ \-d\~\c
.IR ctext ]
.RB [ \-d\~\c
.IB string =\c
.IR text ]
.RB [ \-D\~\c
.IR fallback-encoding ]
.RB [ \-f\~\c
.IR font-family ]
.RB [ \-F\~\c
.IR font-directory ]
.RB [ \-I\~\c
.IR inclusion-directory ]
.RB [ \-K\~\c
.IR input-encoding ]
.RB [ \-L\~\c
.IR spooler-argument ]
.RB [ \-m\~\c
.IR macro-package ]
.RB [ \-M\~\c
.IR macro-directory ]
.RB [ \-n\~\c
.IR page-number ]
.RB [ \-o\~\c
.IR page-list ]
.RB [ \-P\~\c
.IR postprocessor-argument ]
.RB [ \-r\~\c
.IR cnumeric-expression ]
.RB [ \-r\~\c
.IB register =\c
.IR numeric-expression ]
.RB [ \-T\~\c
.IR output-device ]
.RB [ \-w\~\c
.IR warning-category ]
.RB [ \-W\~\c
.IR warning-category ]
.RI [ file\~ .\|.\|.]
.YS
.
.
.SY groff
.B \-h
.
.SY groff
.B \-\-help
.YS
.
.
.SY groff
.B \-v
.RI [ option\~ .\|.\|.\&]
.RI [ file\~ .\|.\|.]
.
.SY groff
.B \-\-version
.RI [ option\~ .\|.\|.\&]
.RI [ file\~ .\|.\|.]
.YS
.
.
.\" ====================================================================
.SH Description
.\" ====================================================================
.
.I groff
is the primary front end to the GNU
.I roff
document formatting system.
.
.\" BEGIN Keep parallel with groff.texi node "What Is groff?".
.\" This language is slightly expanded from that in the "ANNOUNCE" file
.\" and on the groff home page.
GNU
.I roff
is a typesetting system that reads plain text input files that include
formatting commands to produce output in PostScript,
PDF,
HTML,
DVI,
or other formats,
or for display to a terminal.
.
Formatting commands can be low-level typesetting primitives,
macros from a supplied package,
or user-defined macros.
.
All three approaches can be combined.
.
If no
.I file
operands are specified,
or if
.I file
is
.RB \[lq] \- \[rq],
.I groff
reads the standard input stream.
.
.
.P
A reimplementation and extension of the typesetter from AT&T Unix,
.I groff
is present on most POSIX systems owing to its long association with Unix
manuals
(including man pages).
.
It and its predecessor are notable for their production of several
best-selling software engineering texts.
.
.I groff
is capable of producing typographically sophisticated documents while
consuming minimal system resources.
.\" END Keep parallel with groff.texi node "What Is groff?".
.
.
.P
The
.I groff
command orchestrates the execution of preprocessors,
the transformation of input documents into a device-independent page
description language,
and the production of output from that language.
.
.
.\" ====================================================================
.SH Options
.\" ====================================================================
.
.B \-h
and
.B \-\-help
display a usage message and exit.
.
.
.P
Because
.I groff
is intended to subsume most users' direct invocations of the
.MR \%troff 1
formatter,
the two programs share a set of options.
.
However,
.I groff
has some options that
.I \%troff
does not share,
and others which
.I groff
interprets differently.
.
At the same time,
not all valid
.I \%troff
options can be given to
.IR groff .
.
.
.\" ====================================================================
.SS "\f[I]groff\f[]-specific options"
.\" ====================================================================
.
The following options either do not exist in
GNU
.I troff \" GNU
or are interpreted differently by
.IR groff .
.
.
.TP
.BI \-D\~ enc
Set fallback input encoding used by
.MR preconv 1
to
.IR enc ;
implies
.BR \-k .
.
.
.TP
.B \-e
Run
.MR \%eqn 1
preprocessor.
.
.
.TP
.B \-g
Run
.MR \%grn 1
preprocessor.
.
.
.TP
.B \-G
Run
.MR grap 1
preprocessor;
implies
.BR \-p .
.
.
.TP
.BI \-I\~ dir
Works as
.IR \%troff 's
option
(see below),
but also implies
.B \-g
and
.BR \-s .
.
It is passed to
.MR \%soelim 1
and the output driver,
and
.I \%grn
is passed an
.B \-M
option with
.I dir
as its argument.
.
.
.TP
.B \-j
Run
.MR \%chem 1
preprocessor;
implies
.BR \-p .
.
.
.TP
.B \-k
Run
.MR preconv 1
preprocessor.
.
Refer to its man page for its behavior if neither of
.IR groff 's
.B \-K
or
.B \-D
options is also specified.
.
.
.TP
.BI \-K\~ enc
Set input encoding used by
.MR preconv 1
to
.IR enc ;
implies
.BR \-k .
.
.
.TP
.B \-l
Send the output to a spooler program for printing.
.
The
.RB \[lq] print \[rq]
directive in the device description file
specifies the default command to be used;
see
.MR groff_font 5 .
.
If no such directive is present for the output device,
.ie ''' \{\
this option is ignored.
.\}
.el \{\
output is piped to
.MR  1 .
.\}
.
See options
.B \-L
and
.BR \-X .
.
.
.TP
.BI \-L\~ arg
Pass
.I arg
to the print spooler program.
.
If multiple
.IR arg s
are required,
pass each with a separate
.B \-L
option.
.
.I groff
does not prefix an option dash to
.I arg
before passing it to the spooler program.
.
.
.TP
.B \-M
Works as
.IR \%troff 's
option
(see below),
but is also passed to
.MR \%eqn 1 ,
.MR grap 1 ,
and
.MR \%grn 1 .
.
.
.TP
.B \-N
Prohibit newlines between
.I eqn \" language
delimiters:
pass
.B \-N
to
.MR \%eqn 1 .
.
.
.TP
.B \-p
Run
.MR \%pic 1
preprocessor.
.
.
.TP
.BI \-P\~ arg
Pass
.I arg
to the postprocessor.
.
If multiple
.IR arg s
are required,
pass each with a separate
.B \-P
option.
.
.I groff
does not prefix an option dash to
.I arg
before passing it to the postprocessor.
.
.
.TP
.B \-R
Run
.MR \%refer 1
preprocessor.
.
No mechanism is provided for passing arguments to
.I \%refer
because most
.I \%refer
options have equivalent language elements that can be specified within
the document.
.
.
.TP
.B \-s
Run
.MR \%soelim 1
preprocessor.
.
.
.TP
.B \-S
Operate in \[lq]safer\[rq] mode;
see
.B \-U
below for its opposite.
.
For security reasons,
safer mode is enabled by default.
.
.
.TP
.B \-t
Run
.MR \%tbl 1
preprocessor.
.
.
.TP
.BI \-T\~ dev
Direct
.I \%troff
to format the input for the output device
.IR dev .
.
.I groff
then calls an output driver to convert
.IR \%troff 's
output to a form appropriate for
.IR dev ;
see subsection \[lq]Output devices\[rq] below.
.
.
.TP
.B \-U
Operate in unsafe mode:
pass the
.B \-U
option to
.I \%pic
and
.IR \%troff .
.
.
.TP
.B \-v
.TQ
.B \-\-version
Write version information for
.I groff
and all programs run by it to the standard output stream;
that is,
the given command line is processed in the usual way,
passing
.B \-v
to the formatter and any pre- or postprocessors invoked.
.
.
.TP
.B \-V
Output the pipeline that
.I groff
would run to the standard output stream,
but do not execute it.
.
If given more than once,
.I groff
both writes and runs the pipeline.
.
.
.TP
.B \-X
Use
.MR gxditview 1
instead of the usual postprocessor to (pre)view a document on an X11
display.
.
Combining this option with
.B \-Tps
uses the font metrics of the PostScript device,
whereas the
.B \-TX75
and
.B \-TX100
options use the metrics of X11 fonts.
.
.
.TP
.B \-Z
Disable postprocessing.
.
.I \%troff
output will appear on the standard output stream
(unless suppressed with
.BR \-z );
see
.MR groff_out 5
for a description of this format.
.
.
.\" ====================================================================
.SS "Transparent options"
.\" ====================================================================
.
The following options are passed as-is to the formatter program
.MR \%troff 1
and described in more detail in its man page.
.
.
.TP
.B \-a
Generate a plain text approximation of the typeset output.
.
.
.TP
.B \-b
Write a backtrace to the standard error stream on each error or warning.
.
.
.TP
.B \-c
Start with color output disabled.
.
.
.TP
.B \-C
Enable AT&T
.I troff \" AT&T
compatibility mode;
implies
.BR \-c .
.
.
.TP
.BI \-d\~ cs
.TQ
.BI \-d\~ name = string
Define string.
.
.
.TP
.B \-E
Inhibit
.I \%troff
error messages;
implies
.BR \-Ww .
.
.
.TP
.BI \-f\~ fam
Set default font family.
.
.
.TP
.BI \-F\~ dir
Search in directory
.I dir
for the selected output device's directory of device and font
description files.
.
.
.TP
.B \-i
Process standard input after the specified input files.
.
.
.TP
.BI \-I\~ dir
Search
.I dir
for input files.
.
.
.TP
.BI \-m\~ name
Process
.RI name .tmac
before input files.
.
.
.TP
.BI \-M\~ dir
Search directory
.I dir
for macro files.
.
.
.TP
.BI \-n\~ num
Number the first page
.IR num .
.
.
.TP
.BI \-o\~ list
Output only pages in
.IR list .
.
.
.TP
.BI \-r\~ cnumeric-expression
.TQ
.BI \-r\~ register = numeric-expression
Define register.
.
.
.TP
.BI \-w\~ name
.TQ
.BI \-W\~ name
Enable
.RB ( \-w )
or inhibit
.RB ( \-W )
emission of warnings in category
.IR name .
.
.
.TP
.B \-z
Suppress formatted device-independent output of
.IR \%troff .
.
.
.\" ====================================================================
.SH Usage
.\" ====================================================================
.
The architecture of the GNU
.I roff
system
follows that of other device-independent
.I roff
implementations,
comprising preprocessors,
macro packages,
output drivers
(or \[lq]postprocessors\[rq]),
a suite of utilities,
and the formatter
.I \%troff
at its heart.
.
See
.MR roff 7
for a survey of how a
.I roff
system works.
.
.
.P
The front end programs available in the GNU
.I roff
system make it easier to use than traditional
.IR roff s
that required the construction of pipelines or use of temporary files to
carry a source document from maintainable form to device-ready output.
.
The discussion below summarizes the constituent parts of the GNU
.I roff
system.
.
It complements
.MR roff 7
with
.IR groff -specific
information.
.
.
.\" ====================================================================
.SS "Getting started"
.\" ====================================================================
.
Those who prefer to learn by experimenting or are desirous of rapid
feedback from the system may wish to start with a \[lq]Hello,
world!\&\[rq] document.
.
.
.P
.EX
$ \c
.B echo \[dq]Hello, world!\[dq] | groff \-Tascii \
| sed \[aq]/\[ha]$/d\[aq]
Hello, world!
.EE
.
.
.P
We used a
.I sed
command only to eliminate the 65 blank lines that would otherwise flood
the terminal screen.
.
.RI ( roff
systems were developed in the days of paper-based terminals with 66
lines to a page.)
.
.
.P
Today's users may prefer output to a UTF-8-capable terminal.
.
.
.P
.EX
$ \c
.B echo \[dq]Hello, world!\[dq] | groff \-Tutf8 \
| sed \[aq]/\[ha]$/d\[aq]
.EE
.
.
.P
Producing PDF,
HTML,
or \*[TeX]'s DVI is also straightforward.
.
The hard part may be selecting a viewer program for the output.
.
.
.P
.EX
$ \c
.B echo \[dq]Hello, world!\[dq] | groff \-Tpdf > hello.pdf
$ \c
.B evince hello.pdf
$ \c
.B echo \[dq]Hello, world!\[dq] | groff \-Thtml > hello.html
$ \c
.B firefox hello.html
$ \c
.B echo \[dq]Hello, world!\[dq] | groff \-Tdvi > hello.dvi
$ \c
.B xdvi hello.html
.EE
.
.
.\" ====================================================================
.SS "Using \f[I]groff\f[] as a REPL"
.\" ====================================================================
.
Those with a programmer's bent may be pleased to know that they can use
.I groff
in a read-evaluate-print loop (REPL).
.
Doing so can be handy to verify one's understanding of the formatter's
behavior and/or the syntax it accepts.
.
Turning on all warnings with
.B \-ww
can aid this goal.
.
.
.P
.EX
$ \c
.B groff \-ww \-Tutf8
.B \[rs]# This is a comment.  Let\[aq]s define a register.
.B .nr a 1
.B \[rs]# Do integer arithmetic with operators evaluated left-to-right.
.B .nr b \[rs]n[a]+5/2
.ne 2v
.B \[rs]# Let\[aq]s get the result on the standard error stream.
.B .tm \[rs]n[b]
3
.B \[rs]# Now we\[aq]ll define a string.
.B .ds name Leslie\[rs]" This is another form of comment.
.B .nr b (\[rs]n[a] + (7/2))
.B \[rs]# Center the next two text input lines.
.B .ce 2
.B Hi, \[rs]*[name].
.B Your secret number is \[rs]n[b].
.B \[rs]# We will see that the division rounded toward zero.
.B It is
.B \[rs]# Here\[aq]s an if-else control structure.
.B .ie (\[rs]n[b] % 2) odd.
.B .el even.
.B \[rs]# This trick sets the page length to the current vertical
.B \[rs]# position, so that blank lines don\[aq]t spew when we\[aq]re \
done.
.B .pl \[rs]n[nl]u
.I <Control-D>
                           Hi, Leslie.
                    Your secret number is 4.
It is even.
.EE
.
.
.\" ====================================================================
.SS "Paper format"
.\" ====================================================================
.
In GNU
.IR roff ,
the page dimensions for the formatter
.I \%troff
and for output devices are handled separately.
.
In the formatter,
requests are used to set the page length
.RB ( .pl ),
page offset
(or left margin,
.BR .po ),
and line length
.RB ( .ll ).
.
The right margin is not explicitly configured;
the combination of page offset and line length provides the information
necessary to derive it.
.
The
.I papersize
macro package,
automatically loaded by
.IR \%troff ,
provides an interface for configuring page dimensions by convenient
names,
like \[lq]letter\[rq] or
\[lq]A4\[rq];
see
.MR groff_tmac 5 .
.
The formatter's default in this installation is
.RB \[lq] \%letter \[rq].
.
.
.P
It is up to each macro package to respect the page dimensions configured
in this way.
.
Some offer alternative mechanisms.
.
.
.P
For each output device,
the size of the output medium can be set in its
.I DESC
file.
.
Most output drivers also recognize a command-line option
.B \-p
to override the default dimensions and an option
.B \-l
to use landscape orientation.
.
See
.MR groff_font 5
for a description of the
.B papersize
directive,
which takes an argument of the same form as
.BR \-p .
.
The output driver's man page,
such as
.MR grops 1 ,
may also be helpful.
.
.I groff
uses the command-line option
.B \-P
to pass options to output devices;
for example,
use the following for PostScript output on A4 paper in landscape
orientation.
.
.
.IP
.EX
groff \-Tps \-dpaper=a4l \-P\-pa4 \-P\-l \-ms foo.ms > foo.ps
.EE
.
.
.\" ====================================================================
.SS "Front end"
.\" ====================================================================
.
The
.I groff
program is a wrapper around the
.MR \%troff 1
program.
.
It allows one to specify preprocessors via command-line options and
automatically runs the appropriate postprocessor for the selected
output device.
.
Doing so,
the manual construction of pipelines or management of temporary files
required of users of traditional
.MR roff 7
systems can be avoided.
.
Use the
.MR grog 1
program to infer an appropriate
.I groff
command line to format a document.
.
.
.\" ====================================================================
.SS Language
.\" ====================================================================
.
Input to a
.I roff
system is in plain text interleaved with control lines and escape
sequences.
.
The combination constitutes a document in one of a family of languages
we also call
.IR roff ;
see
.MR roff 7
for background.
.
An overview of GNU
.I roff
language syntax and features,
including lists of all supported escape sequences,
requests,
and predefined registers,
can be found in
.MR groff 7 .
.
GNU
.I roff
extensions to the AT&T
.I troff
language,
a common subset of
.I roff
dialects extant today,
are detailed in
.MR groff_diff 7 .
.
.
.\" ====================================================================
.SS Preprocessors
.\" ====================================================================
.
A preprocessor interprets a domain-specific language that produces
.I roff
language output.
.
Frequently,
such input is confined to sections or regions of a
.I roff
input file
(bracketed with macro calls specific to each preprocessor),
which it replaces.
.
Preprocessors therefore often interpret a subset of
.I roff
syntax along with their own language.
.
GNU
.I roff
provides reimplementations of most preprocessors familiar to users of
AT&T
.IR troff ; \" AT&T
these routinely have extended features and/or require GNU
.I troff \" GNU
to format their output.
.
.
.br
.ne 10v
.P
.RS
.TS
tab($);
Li Lx.
\%tbl$lays out tables;
\%eqn$typesets mathematics;
\%pic$draws diagrams;
\%refer$processes bibliographic references;
\%soelim$preprocesses \[lq]sourced\[rq] input files;
\%grn$T{
renders
.MR gremlin 1
diagrams;
T}
\%chem$T{
draws chemical structural formul\[ae]
using
.IR pic ; \" generic
T}
gperl$T{
populates
.I groff
registers and strings using
.MR perl 1 ;
T}
glilypond$T{
embeds
.I LilyPond
sheet music;
and
T}
gpinyin$T{
eases Mandarin Chinese input using Hanyu Pinyin.
T}
.TE
.RE
.
.
.P
A preprocessor unique to GNU
.I roff
is
.MR preconv 1 ,
which converts various input encodings to something GNU
.I troff \" GNU
can understand.
.
When used,
it is run before any other preprocessors.
.
.
.P
Most preprocessors enclose content between a pair of characteristic
tokens.
.
Such a token must occur at the beginning of an input line and use the
dot control character.
.
Spaces and tabs must not follow the control character or precede the
end of the input line.
.
Deviating from these rules defeats a token's recognition by the
preprocessor.
.
Tokens are generally preserved in preprocessor output and interpreted as
macro calls subsequently by
.IR \%troff .
.
The
.I \%ideal
preprocessor is not yet available in
.IR groff .
.
.
.P
.TS
box, center, tab (^);
c | c | c
CfCR | CfCR | CfCR.
preprocessor^starting token^ending token
=
\%chem^.cstart^.cend
\%eqn^.EQ^.EN
grap^.G1^.G2
\%grn^.GS^.GE
.\" Keep the .IF line below the \%ideal line.
\%ideal^.IS^.IE
^^.IF
.\" Keep the .PF line below the \%pic line.
\%pic^.PS^.PE
^^.PF
^^.PY
\%refer^.R1^.R2
\%tbl^.TS^.TE
_
glilypond^.lilypond start^.lilypond stop
gperl^.Perl start^.Perl stop
gpinyin^.pinyin start^.pinyin stop
.TE
.
.
.\" ====================================================================
.SS "Macro packages"
.\" ====================================================================
.
Macro files are
.I roff
input files designed to produce no output themselves but instead ease
the preparation of other
.I roff
documents.
.
When a macro file is installed at a standard location and suitable for
use by a general audience,
it is termed a
.IR "macro package" .
.
.
.P
Macro packages can be loaded prior to any
.I roff
input documents with the
.BR \-m \~option.
.
The GNU
.I roff
system implements most well-known macro packages for AT&T
.I troff \" AT&T
.\" exceptions: mpm, mv
in a compatible way and extends them.
.
These have one- or two-letter names arising from intense practices of
naming economy in early Unix culture,
a laconic approach that led to many of the packages being identified in
general usage with the
.I nroff
and
.I troff
option letter used to invoke them,
sometimes to punning effect,
as with \[lq]man\[rq]
(short for \[lq]manual\[rq]),
and even with the option dash,
as in the case of the
.I s
package,
much better known as
.I ms
or even
.IR \-ms .
.
.
.P
Macro packages serve a variety of purposes.
.
Some are \[lq]full-service\[rq] packages,
adopting responsibility for page layout among other fundamental tasks,
and defining their own lexicon of macros for document composition;
each such package stands alone and a given document can use at most one.
.
.
.TP
.I an
is used to compose man pages in the format originating in Version\~7
Unix (1979);
see
.MR groff_man 7 .
.
It can be specified on the command line as
.BR \-man .
.
.
.TP
.I doc
is used to compose man pages in the format originating in 4.3BSD-Reno
(1990);
see
.MR groff_mdoc 7 .
.
It can be specified on the command line as
.BR \-mdoc .
.
.
.TP
.I e
is the Berkeley general-purpose macro suite,
developed as an alternative to AT&T's
.IR s ;
see
.MR groff_me 7 .
.
It can be specified on the command line as
.BR \-me .
.
.
.TP
.I m
implements the format used by the
second-generation AT&T macro suite for general documents,
a successor to
.IR s ;
see
.MR groff_mm 7 .
.
It can be specified on the command line as
.BR \-mm .
.
.
.TP
.I om
(invariably called \[lq]mom\[rq])
is a modern package written by Peter Schaffter specifically for GNU
.IR roff .
.
Consult the
.UR file://\:/usr/\:\%share/\:\%doc/\:\%packages/\:\%groff/\:\%html/\:mom/\:toc\:.html
.I mom
HTML manual
.UE
for extensive documentation.
.
She\[em]for
.I mom
takes the female pronoun\[em]can be specified on the command line as
.BR \-mom .
.
.
.TP
.I s
is the original AT&T general-purpose document format;
see
.MR groff_ms 7 .
.
It can be specified on the command line as
.BR \-ms .
.
.
.P
Others are supplemental.
.
For instance,
.
.I \%andoc
is a wrapper package specific to GNU
.I roff
that recognizes whether a document uses
.I man
or
.I mdoc
format and loads the corresponding macro package.
.
It can be specified on the command line as
.BR \%\-mandoc .
.
A
.MR man 1
librarian program \" such as man-db, since 2001
may use this macro file to delegate loading of the correct macro
package;
it is thus unnecessary for
.I man
itself to scan the contents of a document to decide the issue.
.
.
.P
Many macro files augment the function of the full-service packages,
or of
.I roff
documents that do not employ such a package\[em]the latter are sometimes
characterized as \[lq]raw\[rq].
.
These auxiliary packages are described,
along with
details of macro file naming and placement,
in
.MR groff_tmac 5 .
.
.
.\" ====================================================================
.SS Formatters
.\" ====================================================================
.
The formatter,
the program that interprets
.I roff
language input,
is
.MR \%troff 1 .
.
It provides the features of the AT&T
.I troff \" AT&T
and
.I nroff \" AT&T
programs as well as many extensions.
.
The command-line option
.B \-C
switches
.I \%troff
into
.IR "compatibility mode" ,
which tries to emulate AT&T
.I troff \" AT&T
as closely as is practical to enable the formatting of documents written
for the older system.
.
.
.P
A shell script,
.MR \%nroff 1 ,
emulates the behavior of AT&T
.IR nroff . \" AT&T
.
It attempts to correctly encode the output based on the locale,
relieving the user of the need to specify an output device with the
.B \-T
option and is therefore convenient for use with terminal output devices,
described in the next subsection.
.
.
.P
GNU
.I troff \" GNU
generates output in a device-independent,
but not device-agnostic,
page description language detailed in
.MR groff_out 5 .
.
.
.\" ====================================================================
.SS "Output devices"
.\" ====================================================================
.
.I \%troff
output is formatted for a particular
.IR "output device" ,
typically specified by the
.B \-T
option to the formatter or a front end.
.
If neither this option nor the
.I \%GROFF_TYPESETTER
environment variable is used,
the default output device is
.BR \%ps .
.
An output device may be any of the following.
.
.
.TP 9n \" to fit "X100\-12" even on troff devices
.B ascii
for terminals using the ISO 646 1991:IRV character set and encoding,
also known as US-ASCII.
.
.
.TP
.B cp1047
for terminals using the IBM code page 1047 character set and encoding.
.
.
.TP
.B dvi
for TeX DVI format.
.
.
.TP
.B html
.TQ
.B xhtml
for HTML and XHTML output,
respectively.
.
.
.TP
.B latin1
for terminals using the ISO Latin-1
(ISO 8859-1)
character set and encoding.
.
.
.TP
.B lbp
for Canon CaPSL printers
(LBP-4 and LBP-8 series laser printers).
.
.
.TP
.B lj4
for HP LaserJet4-compatible
(or other PCL5-compatible)
printers.
.
.
.TP
.B pdf
for PDF output.
.
.
.TP
.B ps
for PostScript output.
.
.
.TP
.B utf8
for terminals using the ISO 10646 (\[lq]Unicode\[rq]) character set in
UTF-8 encoding.
.
.
.TP
.B X75
for previewing with
.I \%gxditview
using
75 dpi resolution and a
10-point base type size.
.
.
.TP
.B X75\-12
for previewing with
.I \%gxditview
using
75 dpi resolution and a
12-point base type size.
.
.
.TP
.B X100
for previewing with
.I \%gxditview
using
100 dpi resolution and a
10-point base type size.
.
.
.TP
.B X100\-12
for previewing with
.I \%gxditview
using
100 dpi resolution
and a
12-point base type size.
.
.
.\" ====================================================================
.SS Postprocessors
.\" ====================================================================
.
Any program that interprets the output of
GNU
.I troff \" GNU
is a
postprocessor.
.
The postprocessors provided by GNU
.I roff
are
.IR "output drivers" ,
which prepare a document for viewing or printing.
.
Postprocessors for other purposes,
such as page resequencing or statistical measurement of a document,
are conceivable.
.
.
.P
An output driver supports one or more output devices,
each with its own device description file.
.
A device determines its postprocessor with the
.B postpro
directive in its device description file;
see
.MR groff_font 5 .
.
The
.B \-X
option overrides this selection,
causing
.I \%gxditview
to serve as the output driver.
.
.
.TP
.MR grodvi 1
provides
.BR dvi .
.
.
.TP
.MR grohtml 1
provides
.B html
and
.BR xhtml .
.
.
.TP
.MR grolbp 1
provides
.BR lbp .
.
.
.TP
.MR grolj4 1
provides
.BR lj4 .
.
.
.TP
.MR gropdf 1
provides
.BR pdf .
.
.
.TP
.MR grops 1
provides
.BR ps .
.
.
.TP
.MR grotty 1
provides
.BR ascii ,
.BR cp1047 ,
.BR latin1 ,
and
.BR utf8 .
.
.
.TP
.MR gxditview 1
provides
.BR X75 ,
.BR X75\-12 ,
.BR X100 ,
and
.BR X100\-12 ,
and additionally can preview
.BR ps .
.
.
.\" ====================================================================
.SS Utilities
.\" ====================================================================
.
GNU
.I roff
includes a suite of utilities.
.
.
.TP
.MR gdiffmk 1
marks differences between a pair of
.I roff
input files.
.
.
.TP
.MR grog 1
infers the
.I groff
command a document requires.
.
.
.P
Several utilities prepare descriptions of fonts,
enabling the formatter to use them when producing output for a given
device.
.
.
.TP
.MR addftinfo 1
adds information to AT&T
.I troff \" AT&T
font description files to enable their use with
GNU
.IR troff .\" GNU
.
.
.TP
.MR afmtodit 1
creates font description files for PostScript Type\~1 fonts.
.
.
.TP
.MR pfbtops 1
translates a PostScript Type\~1 font in PFB
(Printer Font Binary)
format to PFA
(Printer Font ASCII),
which can then be interpreted by
.IR \%afmtodit .
.
.
.TP
.MR hpftodit 1
creates font description files for the HP LaserJet\~4 family of
printers.
.
.
.TP
.MR tfmtodit 1
creates font description files for the TeX DVI device.
.
.
.TP
.MR xtotroff 1
creates font description files for X Window System core fonts.
.
.
.P
A trio of tools transform material constructed using
.I roff
preprocessor languages into graphical image files.
.
.
.TP
.MR eqn2graph 1
converts an
.I eqn
equation into a cropped image.
.
.
.TP
.MR grap2graph 1
converts a
.I grap
diagram into a cropped image.
.
.
.TP
.MR pic2graph 1
converts a
.I pic
diagram into a cropped image.
.
.
.P
Another set of programs works with the bibliographic data files used
by the
.MR refer 1
preprocessor.
.
.
.TP
.MR \%indxbib 1
makes inverted indices for bibliographic databases,
speeding lookup operations on them.
.
.
.TP
.MR lkbib 1
searches the databases.
.
.
.TP
.MR \%lookbib 1
interactively searches
the databases.
.
.
.\" ====================================================================
.SH "Exit status"
.\" ====================================================================
.
.I groff
exits with a failure status if there was a problem parsing its arguments
and a successful status if either of the options
.B \-h
or
.B \-\-help
was specified.
.
Otherwise,
.I groff
runs a pipeline to process its input;
if all commands within the pipeline exit successfully,
.I groff
does likewise.
.
If not,
.IR groff 's
exit status encodes a summary of problems encountered,
setting bit\~0 if a command exited with a failure status,
bit\~1 if a command was terminated with a signal,
and bit\~2 if a command could not be executed.
.
(Thus,
if all three misfortunes befell one's pipeline,
.I groff
would exit with status 2\[ha]0 + 2\[ha]1 + 2\[ha]2 = 1+2+4 = 7.)
.
To troubleshoot pipeline problems,
you may wish to re-run the
.I groff
command with the
.B \-V
option and break the reported pipeline down into separate stages,
inspecting the exit status of and diagnostic messages emitted by each
command.
.
.
.\" ====================================================================
.SH Environment
.\" ====================================================================
.
Normally,
the path separator in environment variables ending with
.I PATH
is the colon;
this may vary depending on the operating system.
.
For example,
Windows uses a semicolon instead.
.
.
.TP
.I GROFF_BIN_PATH
This search path,
followed by
.IR PATH ,
is used to locate commands executed by
.IR groff .
.
If it is not set,
the installation directory of the GNU
.I roff
executables,
.IR /usr/\:\%bin ,
is searched before
.IR PATH .
.
.
.TP
.I GROFF_COMMAND_PREFIX
GNU
.I roff
can be configured at compile time to apply a prefix to the names of the
programs it provides that had a counterpart in AT&T
.IR troff , \" AT&T
so that name collisions are avoided at run time.
.
The default prefix is empty.
.
.
.IP
When used,
this prefix is conventionally the letter \[lq]g\[rq].
.
For example,
GNU
.I troff \" GNU
would be installed as
.IR gtroff .
.
Besides
.IR troff , \" GNU
the prefix applies to
the formatter
.IR nroff ; \" GNU
the preprocessors
.IR eqn , \" generic
.IR grn , \" generic
.IR pic , \" generic
.IR \%refer , \" generic
.IR tbl , \" generic
and
.IR \%soelim ; \" generic
and the utilities
.I \%indxbib \" generic
and
.IR \%lookbib . \" generic
.
.
.TP
.I GROFF_ENCODING
The value of this variable is passed to the
.IR preconv (1)
preprocessor's
.B \-e
option to select the character encoding of input files.
.
This variable's existence implies
the
.I groff
option
.BR \-k .
.
If set but empty,
.I groff
calls
.I preconv
without an
.B \-e
option.
.
.IR groff 's
.B \-K
option overrides
.IR \%GROFF_ENCODING .
.
.
.TP
.I GROFF_FONT_PATH
Seek the selected output device's directory of device and font
description files in this list of directories.
.
See
.MR \%troff 1
and
.MR groff_font 5 .
.
.
.TP
.I GROFF_TMAC_PATH
Seek macro files in this list of directories.
.
See
.MR \%troff 1
and
.MR groff_tmac 5 .
.
.
.TP
.I GROFF_TMPDIR
Create temporary files in this directory.
.
If not set,
but the environment variable
.I \%TMPDIR
is set,
temporary files are created there instead.
.
On Windows systems,
if neither of the foregoing are set,
the environment variables
.I TMP
and
.I TEMP
(in that order)
are checked also.
.
Otherwise,
temporary files are created in
.IR /tmp .
.
The
.MR \%refer 1 ,
.MR grohtml 1 ,
and
.MR grops 1
commands use temporary files.
.
.
.TP
.I GROFF_TYPESETTER
Set the default output device.
.
If empty or not set,
.B \%ps
is used.
.
The
.B \-T
option overrides
.IR \%GROFF_TYPESETTER .
.
.
.TP
.I SOURCE_DATE_EPOCH
A time stamp
(expressed as seconds since the Unix epoch)
to use as the output creation time stamp in place of the current time.
.
The time is converted to human-readable form using
.MR localtime 3
when the formatter starts up and stored in registers usable by documents
and macro packages.
.
.
.TP
.I TZ
The time zone to use when converting the current time
(or value of
.IR SOURCE_DATE_EPOCH )
to human-readable form;
see
.MR tzset 3 .
.
.
.\" ====================================================================
.SH Examples
.\" ====================================================================
.
.I roff
systems are best known for formatting man pages.
.
Once a
.MR man 1
librarian program has located a man page,
it may execute a
.I groff
command much like the following.
.
.RS
.EX
groff \-t \-man \-Tutf8 /usr/share/man/man1/groff.1
.EE
.RE
.
The librarian will also pipe the output through a pager,
which might not interpret the SGR terminal escape sequences
.I groff
emits for boldface,
underlining,
or italics;
see section \[lq]Limitations\[rq] below.
.
.
.P
To process a
.I roff
input file using the preprocessors
.I \%tbl
and
.I \%pic
and the
.I me
macro package in the way to which AT&T
.I troff \" AT&T
users were accustomed,
one would type
(or script)
a pipeline.
.
.
.IP
.EX
\%pic foo.me | \%tbl | \%troff \-me \-Tutf8 | grotty
.EE
.
.
.P
Using
.IR groff ,
this pipe can be shortened to an equivalent command.
.
.IP
.EX
groff \-p \-t \-me \-T utf8 foo.me
.EE
.
.
.P
An even easier way to do this is to use
.MR grog 1
to guess the preprocessor and macro options and execute the result by
using the command substitution feature of the shell.
.
.IP
.EX
$(grog \-Tutf8 foo.me)
.EE
.
.
.P
Each command-line option to a postprocessor must be specified with any
required leading dashes
.RB \[lq] \- \[rq]
.\" No GNU roff postprocessor uses long options for anything except
.\" --help or --version.
.\"or
.\".RB \[lq] \-\- \[rq]
because
.I groff
passes the arguments as-is to the postprocessor;
this permits arbitrary arguments to be transmitted.
.
For example,
to pass a title to the
.I gxditview
postprocessor,
the shell commands
.
.RS
.EX
groff \-X \-P \-title \-P \[aq]trial run\[aq] mydoc.t
.EE
.RE
.
and
.
.RS
.EX
groff \-X \-Z mydoc.t | gxditview \-title \[aq]trial run\[aq] \-
.EE
.RE
.
are equivalent.
.
.
.\" ====================================================================
.SH Limitations
.\" ====================================================================
.
When paging output for the
.BR ascii ,
.BR cp1047 ,
.BR latin1 ,
and
.B utf8
devices,
programs like
.MR more 1
and
.MR less 1
may require command-line options to correctly handle some terminal
escape sequences;
see
.MR grotty 1 .
.
.
.P
On EBCDIC hosts such as OS/390 Unix,
the output devices
.B ascii
and
.B latin1
aren't available.
.
Conversely,
the output device
.B cp1047
is not available on systems based on the ISO\~646 or ISO\~8859 character
encoding standards.
.
.
.\" ====================================================================
.SH "Installation directories"
.\" ====================================================================
.
GNU
.I roff
installs files in varying locations depending on its compile-time
configuration.
.
On this installation,
the following locations are used.
.
.
.if !''' \{\
.TP
.I 
Application defaults directory for
.MR gxditview 1 .
.\}
.
.
.TP
.I /usr/\:\%bin
Directory containing
.IR groff 's
executable commands.
.
.
.TP
.I /usr/\:\%share/\:\%groff/\:\%1.23.0/\:\%eign
List of common words for
.MR indxbib 1 .
.
.
.TP
.I /usr/\:\%share/\:\%groff/\:\%1.23.0
Directory for data files.
.
.
.TP
.I /usr/\:\%dict/\:\%papers/\:\%Ind
Default index for
.MR lkbib 1
and
.MR refer 1 .
.
.
.TP
.I /usr/\:\%share/\:\%doc/\:\%packages/\:\%groff
Documentation directory.
.
.
.TP
.I /usr/\:\%share/\:\%doc/\:\%packages/\:\%groff/\:\%examples
Example directory.
.
.
.TP
.I /usr/\:\%share/\:\%groff/\:\%1.23.0/\:\%font
Font directory.
.
.
.TP
.I /usr/\:\%share/\:\%doc/\:\%packages/\:\%groff/\:\%html
HTML documentation directory.
.
.
.TP
.I /usr/\:\%lib/\:\%font
Legacy font directory.
.
.
.TP
.I /usr/\:\%share/\:\%groff/\:\%site\-font
Local font directory.
.
.
.TP
.I /usr/\:\%share/\:\%groff/\:\%site\-tmac
Local macro package
.RI ( tmac
file) directory.
.
.
.TP
.I /usr/\:\%share/\:\%groff/\:\%1.23.0/\:\%tmac
Macro package
.RI ( tmac
file) directory.
.
.
.TP
.I /usr/\:\%share/\:\%groff/\:\%1.23.0/\:\%oldfont
Font directory for compatibility with old versions of
.IR groff ;
see
.MR grops 1 .
.
.
.TP
.I /usr/\:\%share/\:\%doc/\:\%packages/\:\%groff/\:\%pdf
PDF documentation directory.
.
.
.if !'no'no' \{\
.TP
.I /usr/\:\%libexec/\:\%groff/\:\%site\-tmac
System macro package
.RI ( tmac
file) directory.
.\}
.
.
.\" ====================================================================
.SS "\f[I]groff\f[] macro directory"
.\" ====================================================================
.
Most macro files supplied with GNU
.I roff
are stored in
.I /usr/\:\%share/\:\%groff/\:\%1.23.0/\:\%tmac
for the installation corresponding to this document.
.
As a rule,
multiple directories are searched for macro files;
see
.MR \%troff 1 .
.
For a catalog of macro files GNU
.I roff
provides,
see
.MR groff_tmac 5 .
.
.
.\" ====================================================================
.SS "\f[I]groff\f[] device and font description directory"
.\" ====================================================================
.
Device and font description files supplied with GNU
.I roff
are stored in
.I /usr/\:\%share/\:\%groff/\:\%1.23.0/\:\%font
for the installation corresponding to this document.
.
As a rule,
multiple directories are searched for device and font description files;
see
.MR \%troff 1 .
.
For the formats of these files,
see
.MR groff_font 5 .
.
.
.\" ====================================================================
.SH Availability
.\" ====================================================================
.
Obtain links to
.I groff
releases for download,
its source repository,
discussion mailing lists,
a support ticket tracker,
and further information from the
.UR http://\:www\:.gnu\:.org/\:software/\:groff
.I groff
page of the GNU website
.UE .
.
.
.P
A free implementation of the
.I grap
preprocessor,
written by
.MT faber@\:lunabase\:.org
Ted Faber
.ME ,
can be found at the
.UR http://\:www\:.lunabase\:.org/\:\[ti]faber/\:Vault/\:software/\
\:grap/
.I grap
website
.UE .
.
.I groff
supports only this
.IR grap .
.
.
.\" ====================================================================
.SH Authors
.\" ====================================================================
.
.I groff
(both the front-end command and the overall system)
was primarily written by
.MT jjc@\:jclark\:.com
James Clark
.ME .
.
Contributors to this document include Clark,
Trent A.\& Fisher,
.MT wl@gnu.org
Werner Lemberg
.ME ,
.MT groff\-bernd.warken\-72@\:web\:.de
Bernd Warken
.ME ,
and
.MT g.branden\:.robinson@\:gmail\:.com
G.\& Branden Robinson
.ME .
.
.
.\" ====================================================================
.SH "See also"
.\" ====================================================================
.
.IR "Groff: The GNU Implementation of troff" ,
by Trent A.\& Fisher and Werner Lemberg,
is the primary
.I groff
manual.
.
You can browse it interactively with \[lq]info groff\[rq].
.
.
.\" groff ships 59 man pages generated from 58 source files.  The
.\" numbered comments refer to their sorting order in the source tree,
.\" so that it is easier to tell that we've enumerated all of them.
.TP
Introduction, \c
history, \c
and further reading:
.MR roff 7 \" #23
.
.
.TP
.RI "Viewer for\~" groff "\~(and AT&T device-independent\~" troff \
)\~documents:
.MR gxditview 1 \" #33
.
.
.TP
Preprocessors:
.MR \%chem 1 , \" #1
.MR \%eqn 1 , \" #34
.MR \%neqn 1 , \" #35
.MR glilypond 1 , \" #4
.MR \%grn 1 , \" #36
.MR preconv 1 , \" #38
.MR gperl 1 , \" #5
.MR \%pic 1 , \" #37
.MR gpinyin 1 , \" #6
.MR \%refer 1 , \" #39
.MR \%soelim 1 , \" #40
.MR \%tbl 1 \" #41
.
.
.TP
Macro packages and package-specific utilities:
.MR groff_hdtbl 7 , \" #9
.MR groff_man 7 , \" #55a
.MR groff_man_style 7 , \" #55b
.MR groff_mdoc 7 , \" #56
.MR groff_me 7 , \" #57
.MR groff_mm 7 , \" # 10
.MR groff_mmse 7 , \" # 11
.MR mmroff 1 , \" #12
.MR groff_mom 7 , \" #13
.MR pdfmom 1 , \" #30
.MR groff_ms 7 , \" #58
.MR groff_rfc1345 7 , \" 16
.MR groff_trace 7 , \" #59
.MR groff_www 7 \" #60
.
.
.TP
Bibliographic database management tools:
.MR \%indxbib 1 , \" #49
.MR lkbib 1 , \" #50
.MR \%lookbib 1 \" #51
.
.
.TP
Language, \c
conventions, \c
and GNU extensions:
.MR groff 7 , \" #17
.MR groff_char 7 , \" #18
.MR groff_diff 7 , \" #19
.MR groff_font 5 , \" #20
.MR groff_tmac 5 \" #22
.
.
.TP
Intermediate output language:
.MR groff_out 5 \" #21
.
.
.TP
Formatter program:
.MR \%troff 1 \" #45
.
.
.TP
Formatter wrappers:
.\".MR groff 1 , \" 42 -- this page
.MR \%nroff 1 , \" #44
.MR pdfroff 1 \" #14
.
.
.TP
Postprocessors for output devices:
.MR grodvi 1 , \" #24
.MR grohtml 1 , \" #25
.MR grolbp 1 , \" #26
.MR grolj4 1 , \" #27
.MR gropdf 1 , \" #29
.MR grops 1 , \" #31
.MR grotty 1 \" #32
.
.
.TP
Font support utilities:
.MR addftinfo 1 , \" #46
.MR afmtodit 1 , \" #47
.MR hpftodit 1 , \" #48
.MR pfbtops 1 , \" #52
.MR tfmtodit 1 , \" #53
.MR xtotroff 1 \" #54
.
.
.TP
Graphics conversion utilities:
.MR eqn2graph 1 , \" #2
.MR grap2graph 1 , \" #7
.MR pic2graph 1 \" #15
.
.
.TP
Difference-marking utility:
.MR gdiffmk 1 \" #3
.
.
.TP
\[lq]groff guess\[rq] utility:
.MR grog 1 \" #43
.
.
.\" Restore compatibility mode (for, e.g., Solaris 10/11).
.cp \n[*groff_groff_1_man_C]
.do rr *groff_groff_1_man_C
.
.
.\" Local Variables:
.\" fill-column: 72
.\" mode: nroff
.\" End:
.\" vim: set filetype=groff textwidth=72: