File: troff.1.man

package info (click to toggle)
groff 1.22.4-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 21,236 kB
  • sloc: cpp: 73,640; ansic: 21,994; perl: 10,764; sh: 7,065; cs: 3,696; makefile: 892; awk: 91; sed: 76
file content (685 lines) | stat: -rw-r--r-- 13,058 bytes parent folder | download | duplicates (3)
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
'\" t
.TH @G@TROFF @MAN1EXT@ "@MDATE@" "groff @VERSION@"
.SH NAME
@g@troff \- the troff processor of the groff text formatting system
.
.\" troff.man -> troff.1
.
.
.\" ====================================================================
.\" Legal Terms
.\" ====================================================================
.\"
.\" Copyright (C) 1989-2018 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.
.\"
.\" A copy of the GNU Free Documentation License is also available in this
.\" Debian package as /usr/share/doc/groff-base/copyright.
.
.
.\" ====================================================================
.SH SYNOPSIS
.\" ====================================================================
.
.SY @g@troff
.OP \-abcivzCERU
.OP \-d cs
.OP \-f fam
.OP \-F dir
.OP \-I dir
.OP \-m name
.OP \-M dir
.OP \-n num
.OP \-o list
.OP \-r cn
.OP \-T name
.OP \-w name
.OP \-W name
.RI [ file
\&.\|.\|.\&]
.YS
.
.
.\" ====================================================================
.SH DESCRIPTION
.\" ====================================================================
.
This manual page describes the GNU version of
.BR troff .
.
It is part of the groff document formatting system.
.
It is functionally compatible with Unix troff, but has many
extensions, see
.BR \%groff_diff (@MAN7EXT@).
.
Usually it should be invoked using the
.BR groff (@MAN1EXT@)
command which will also run preprocessors and postprocessors in the
appropriate order and with the appropriate options.
.
.
.\" ====================================================================
.SH OPTIONS
.\" ====================================================================
.
Whitespace is permitted between a command-line option and its argument.
.
.
.TP
.B \-a
Generate an ASCII approximation of the typeset output.
.
.TP
.B \-b
Print a backtrace with each warning or error message.
.
This backtrace should help track down the cause of the error.
.
The line numbers given in the backtrace may not always be correct, for
.BR @g@troff 's
idea of line numbers gets confused by
.B as
or
.B am
requests.
.
.TP
.B \-c
Disable color output (always disabled in compatibility mode).
.
.TP
.B \-C
Enable compatibility mode.
.
.TP
.BI \-d cs
.TQ
.BI \-d name = s
Define
.I c
or
.I name
to be a string
.IR s ;
.I c
must be a one letter name.
.
.TP
.B \-E
Inhibit all error messages of
.BR @g@troff .
.
Note that this doesn't affect messages output to standard error by
macro packages using the
.B tm
or
.B tm1
requests.
.
.TP
.BI \-f fam
Use
.I fam
as the default font family.
.
.TP
.BI \-F dir
Search in directory (or directory path)
.I dir
for subdirectories
.IR dev name
.RI ( name
is the name of the device) and there for the
.I DESC
file and font files.
.
.I dir
is scanned before all other font directories.
.
.TP
.B \-i
Read the standard input after all the named input files have been
processed.
.
.TP
.BI \-I dir
This option may be used to add a directory to the search path for
files (both those on the command line and those named in
.B \&.psbb
requests).
.
The search path is initialized with the current directory.
.
This option may be specified more than once; the directories are then
searched in the order specified (but before the current directory).
.
If you want to make the current directory be read before other
directories, add
.B \-I.\&
at the appropriate place.
.
.IP
No directory search is performed for files with an absolute file name.
.
.TP
.BI \-m name
Read in the file
.RI name .tmac .
.
If it isn't found, try
.IR tmac. name
instead.
.
It will be first searched for in directories given with the
.B \-M
command-line option, then in directories given in the
.I GROFF_TMAC_PATH
environment variable, then in the current directory (only if in unsafe
mode), the home directory,
.IR @SYSTEMMACRODIR@ ,
.IR @LOCALMACRODIR@ ,
and
.IR @MACRODIR@ .
.
.TP
.BI \-M dir
Search directory (or directory path)
.I dir
for macro files.
.
This is scanned before all other macro directories.
.
.TP
.BI \-n num
Number the first page
.IR num .
.
.TP
.BI \-o list
Output only pages in
.IR list ,
which is a comma-separated list of page ranges;
.I n
means print page
.IR n ,
.IB m \- n
means print every page between
.I m
and
.IR n ,
.BI \- n
means print every page up to
.IR n ,
.IB n \-
means print every page from
.IR n .
.
.B @g@troff
will exit after printing the last page in the list.
.
.TP
.BI \-r cn
.TQ
.BI \-r name = n
Set number register
.I c
or
.I name
to
.IR n ;
.I c
must be a one character name;
.I n
can be any troff numeric expression.
.
.TP
.B \-R
Don't load
.I troffrc
and
.IR troffrc\-end .
.
.TP
.BI \-T name
Prepare output for device
.IR name ,
rather than the default
.BR @DEVICE@ ;
see
.BR groff (@MAN1EXT@)
for a more detailed description.
.
.TP
.B \-U
Unsafe mode.
.
This will enable the following requests:
.BR open ,
.BR opena ,
.BR pso ,
.BR sy ,
and
.BR pi .
For security reasons, these potentially dangerous requests are
disabled otherwise.
.
It will also add the current directory to the macro search path.
.
.TP
.B \-v
Print the version number.
.
.TP
.BI \-w name
Enable warning
.IR  name .
.
Available warnings are described in section \(lqWarnings\(rq below.
.
To enable most useful warnings use
.B \-w
.BR all .
To enable absolutely all warnings use
.B \-w w
instead.
Multiple
.B \-w
options are allowed.
.
.TP
.BI \-W name
Inhibit warning
.IR name .
.
Multiple
.B \-W
options are allowed.
.
.TP
.B \-z
Suppress formatted output.
.
.
.\" ====================================================================
.SH WARNINGS
.\" ====================================================================
.
The warnings that can be given by
.B @g@troff
are divided into the following categories.
.
The name associated with each warning is used by the
.B \-w
and
.B \-W
options; the number is used by the
.B warn
request, and by the
.B .warn
register; it is always a power of 2 to allow bitwise composition.
.
.P
.TS
tab(@), center, box;
c c c | c c c
r rI lB | r rI lB.
Bit@Code@Warning@Bit@Code@Warning
_
0@1@char@10@1024@reg
1@2@number@11@2048@tab
2@4@break@12@4096@right-brace
3@8@delim@13@8192@missing
4@16@el@14@16384@input
5@32@scale@15@32768@escape
6@64@range@16@65536@space
7@128@syntax@17@131072@font
8@256@di@18@262144@ig
9@512@mac@19@524288@color
@@@20@1048576@file
.TE
.
.P
.nr x \w'\fBright-brace'+1n+\w'00000'u
.ta \nxuR
.
.TP \nxu+3n
.BR break "\t4"
In fill mode, lines which could not be broken so that their length was
less than the line length.
.
This is enabled by default.
.
.TP
.BR char "\t1"
Non-existent characters.
.
This is enabled by default.
.
.TP
.BR color "\t524288"
Color-related warnings.
.
.TP
.BR delim "\t8"
Missing or mismatched closing delimiters.
.
.TP
.BR di "\t256"
Use of
.B di
or
.B da
without an argument when there is no current diversion.
.
.TP
.BR el "\t16"
Use of the
.B el
request with no matching
.B ie
request.
.
.TP
.BR escape "\t32768"
Unrecognized escape sequences.
.
When an unrecognized escape sequence is encountered, the escape
character is ignored.
.
.TP
.BR file "\t1048576"
Indicates a missing file for the
.B mso
request.
.
Enabled by default.
.
.TP
.BR font "\t131072"
Non-existent fonts.
.
This is enabled by default.
.
.TP
.BR ig "\t262144"
Invalid escapes in text ignored with the
.B ig
request.
.
These are conditions that are errors when they do not occur in ignored
text.
.
.TP
.BR input "\t16384"
Invalid input characters.
.
.TP
.BR mac "\t512"
Use of undefined strings, macros and diversions.
.
When an undefined string, macro or diversion is used, that string is
automatically defined as empty.
.
So, in most cases, at most one warning will be given for each name.
.
.TP
.BR missing "\t8192"
Requests that are missing non-optional arguments.
.
.TP
.BR number "\t2"
Invalid numeric expressions.
.
This is enabled by default.
.
.TP
.BR range "\t64"
Out of range arguments.
.
.TP
.BR reg "\t1024"
Use of undefined number registers.
.
When an undefined number register is used, that register is
automatically defined to have a value of\~0.
.
So, in most cases, at most one warning will be given for use of a
particular name.
.
.TP
.BR right-brace "\t4096"
Use of
.B \(rs}
where a number was expected.
.
.TP
.BR scale "\t32"
Meaningless scaling indicators.
.
.TP
.BR space "\t65536"
Missing space between a request or macro and its argument.
.
This warning will be given when an undefined name longer than two
characters is encountered, and the first two characters of the name
make a defined name.
.
The request or macro will not be invoked.
.
When this warning is given, no macro is automatically defined.
.
This is enabled by default.
.
This warning will never occur in compatibility mode.
.
.TP
.BR syntax "\t128"
Dubious syntax in numeric expressions.
.
.TP
.BR tab "\t2048"
Inappropriate use of a tab character.
.
Either use of a tab character where a number was expected, or use of tab
character in an unquoted macro argument.
.
.P
There are also names that can be used to refer to groups of warnings:
.
.TP
.B all
All warnings except
.BR di ,
.BR mac ,
and
.BR reg .
.
It is intended that this covers all warnings that are useful with
traditional macro packages.
.
.TP
.B w
All warnings.
.
.
.\" ====================================================================
.SH ENVIRONMENT
.\" ====================================================================
.
.TP
.I GROFF_TMAC_PATH
A colon separated list of directories in which to search for
macro files.
.
.B @g@troff
will scan directories given in the
.B \-M
option before these, and in standard directories (current directory if
in unsafe mode, home directory,
.IR @SYSTEMMACRODIR@ ,
.IR @LOCALMACRODIR@ ,
.IR @MACRODIR@ )
after these.
.
.TP
.I GROFF_TYPESETTER
Default device.
.
.TP
.I GROFF_FONT_PATH
A colon separated list of directories in which to search for the
.IR dev name
directory.
.
.B @g@troff
will scan directories given in the
.B \-F
option before these, and in standard directories
.RI ( @LOCALFONTDIR@ ,
.IR @FONTDIR@ ,
.IR @LEGACYFONTDIR@ )
after these.
.
.
.\" ====================================================================
.SH FILES
.\" ====================================================================
.
.TP
.I @MACRODIR@/troffrc
Initialization file (called before any other macro package).
.
.TP
.I @MACRODIR@/troffrc\-end
Initialization file (called after any other macro package).
.
.TP
.IR @MACRODIR@/ name .tmac
.TQ
.IR @MACRODIR@/tmac. name
Macro files
.
.TP
.IR @FONTDIR@/dev name /DESC
Device description file for device
.IR name .
.
.TP
.IR @FONTDIR@/dev name / F
Font file for font
.I F
of device
.IR name .
.
.
.P
Note that
.I troffrc
and
.I troffrc\-end
are searched for neither in the current nor the home directory by
default for security reasons (even if the
.B \-U
option is given).
.
Use the
.B \-M
command-line option or the
.I GROFF_TMAC_PATH
environment variable to add these directories to the search path if
necessary.
.
.
.\" ====================================================================
.SH AUTHORS
.\" ====================================================================
.
The GNU version of
.I troff
was originally written by James Clark;
he also wrote the original version of this document,
which was modified by
.MT wl@\:gnu.org
Werner Lemberg
.ME
and
.MT groff\-bernd.warken\-72@\:web.de
Bernd Warken
.ME .
.
.
.\" ====================================================================
.SH "SEE ALSO"
.\" ====================================================================
.
.TP
.BR groff (@MAN1EXT@)
The main program of the
.I groff
system, a wrapper around
.IR @g@troff .
.
.TP
.BR groff (@MAN7EXT@)
A description of the
.I groff
language, including a short but complete reference of all predefined
requests, registers, and escapes of plain
.IR groff .
.
From the command line, this is called by
.RS
.IP
.B man 7 groff
.RE
.
.TP
.BR \%groff_diff (@MAN7EXT@)
The differences of the
.I groff
language and the
.I classical troff
language.
.
Currently, this is the most actual document of the
.I groff
system.
.
.TP
.BR roff (@MAN7EXT@)
An overview over
.I groff
and other
.I roff
systems, including pointers to further related documentation.
.
.
.P
.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 \(lqinfo groff\(rq.
.
.
.\" ====================================================================
.\" Emacs variables
.\" ====================================================================
.
.\" Local Variables:
.\" mode: nroff
.\" End:
.\" vim: set filetype=groff: