1TROFF(1)                    General Commands Manual                   TROFF(1)
2
3
4

NAME

6       troff - the troff processor of the groff text formatting system
7

SYNOPSIS

9       troff [ -abcivzCERU ] [ -dcs ] [ -ffam ] [ -Fdir ] [ -mname ] [ -Mdir ]
10             [ -nnum ] [ -olist ] [ -rcn ] [ -Tname ] [ -wname ] [ -Wname ]
11             [ files... ]
12
13       It is possible to have whitespace between a command line option and its
14       parameter.
15

DESCRIPTION

17       This manual page describes the GNU version of troff.  It is part of the
18       groff  document  formatting system.  It is functionally compatible with
19       UNIX troff, but has many extensions,  see  groff_diff(7).   Usually  it
20       should  be  invoked using the groff(1) command which will also run pre‐
21       processors and postprocessors in the appropriate  order  and  with  the
22       appropriate options.
23

OPTIONS

25       -a        Generate an ASCII approximation of the typeset output.
26
27       -b        Print  a  backtrace with each warning or error message.  This
28                 backtrace should help track down the cause of the error.  The
29                 line  numbers  given  in the backtrace may not always be cor‐
30                 rect, for troff's idea of line numbers gets confused by as or
31                 am requests.
32
33       -c        Disable color output (always disabled in compatibility mode).
34
35       -C        Enable compatibility mode.
36
37       -dcs
38       -dname=s  Define  c  or  name  to be a string s; c must be a one letter
39                 name.
40
41       -E        Inhibit all error messages of troff.  Note that this  doesn't
42                 affect  messages  output  to standard error by macro packages
43                 using the tm or tm1 requests.
44
45       -ffam     Use fam as the default font family.
46
47       -Fdir     Search in directory (or directory path) dir  for  subdirecto‐
48                 ries  devname  (name is the name of the device) and there for
49                 the DESC file and font files.   dir  is  scanned  before  all
50                 other font directories.
51
52       -i        Read  the standard input after all the named input files have
53                 been processed.
54
55       -mname    Read in the file name.tmac.  If it isn't found, try tmac.name
56                 instead.   It will be first searched for in directories given
57                 with the -M command line option, then in directories given in
58                 the GROFF_TMAC_PATH environment variable, then in the current
59                 directory (only if  in  unsafe  mode),  the  home  directory,
60                 /usr/lib64/groff/site-tmac,  /usr/share/groff/site-tmac,  and
61                 /usr/share/groff/1.18.1.4/tmac.
62
63       -Mdir     Search directory (or directory path)  dir  for  macro  files.
64                 This is scanned before all other macro directories.
65
66       -nnum     Number the first page num.
67
68       -olist    Output only pages in list, which is a comma-separated list of
69                 page ranges; n means print page n, m-n means print every page
70                 between  m and n, -n means print every page up to n, n- means
71                 print every page from n.  troff will exit after printing  the
72                 last page in the list.
73
74       -rcn
75       -rname=n  Set number register c or name to n; c must be a one character
76                 name; n can be any troff numeric expression.
77
78       -R        Don't load troffrc and troffrc-end.
79
80       -Tname    Prepare output for device name, rather than the default ps.
81
82       -U        Unsafe mode.  This will enable the following requests:  open,
83                 opena,  pso,  sy, and pi.  For security reasons, these poten‐
84                 tially dangerous requests are disabled  otherwise.   It  will
85                 also add the current directory to the macro search path.
86
87       -v        Print the version number.
88
89       -wname    Enable warning name.  Available warnings are described in the
90                 section WARNINGS below.  For example, to enable all warnings,
91                 use -w all.  Multiple -w options are allowed.
92
93       -Wname    Inhibit warning name.  Multiple -W options are allowed.
94
95       -z        Suppress formatted output.
96

WARNINGS

98       The  warnings that can be given by troff are divided into the following
99       categories.  The name associated with each warning is used  by  the  -w
100       and  -W  options;  the  number  is used by the warn request, and by the
101       .warn register; it is always a power of 2 to allow bitwise composition.
102
103                 ┌─────────────────────┬────────────────────────────┐
104                 │Bit   Code   Warning │ Bit    Code      Warning   │
105                 ├─────────────────────┼────────────────────────────┤
106                 │  0      1   char    │  10     1024   reg         
107                 │  1      2   number  │  11     2048   tab         
108                 │  2      4   break   │  12     4096   right-brace 
109                 │  3      8   delim   │  13     8192   missing     
110                 │  4     16   el      │  14    16384   input       
111                 │  5     32   scale   │  15    32768   escape      
112                 │  6     64   range   │  16    65536   space       
113                 │  7    128   syntax  │  17   131072   font        
114                 │  8    256   di      │  18   262144   ig          
115                 │  9    512   mac     │  19   524288   color       
116                 └─────────────────────┴────────────────────────────┘
117       break           4   In fill mode, lines which could not  be  broken  so
118                           that  their  length  was less than the line length.
119                           This is enabled by default.
120
121       char            1   Non-existent  characters.   This  is   enabled   by
122                           default.
123
124       color      524288   Color related warnings.
125
126       delim           8   Missing or mismatched closing delimiters.
127
128       di            256   Use  of  di or da without an argument when there is
129                           no current diversion.
130
131       el             16   Use of the el request with no matching ie request.
132
133       escape      32768   Unrecognized escape sequences.   When  an  unrecog‐
134                           nized  escape  sequence  is encountered, the escape
135                           character is ignored.
136
137       font       131072   Non-existent fonts.  This is enabled by default.
138
139       ig         262144   Invalid  escapes  in  text  ignored  with  the   ig
140                           request.  These are conditions that are errors when
141                           they do not occur in ignored text.
142
143       input       16384   Invalid input characters.
144
145       mac           512   Use of undefined strings,  macros  and  diversions.
146                           When  an  undefined  string,  macro or diversion is
147                           used,  that  string  is  automatically  defined  as
148                           empty.  So, in most cases, at most one warning will
149                           be given for each name.
150
151       missing      8192   Requests that are missing non-optional arguments.
152
153       number          2   Invalid numeric expressions.  This  is  enabled  by
154                           default.
155
156       range          64   Out of range arguments.
157
158       reg          1024   Use  of  undefined number registers.  When an unde‐
159                           fined number register is  used,  that  register  is
160                           automatically defined to have a value of 0.  So, in
161                           most cases, at most one warning will be  given  for
162                           use of a particular name.
163
164       right-brace  4096   Use of \} where a number was expected.
165
166       scale          32   Meaningless scaling indicators.
167
168       space       65536   Missing  space  between  a request or macro and its
169                           argument.  This warning will be given when an unde‐
170                           fined  name  longer  than two characters is encoun‐
171                           tered, and the first two  characters  of  the  name
172                           make a defined name.  The request or macro will not
173                           be invoked.  When this warning is given,  no  macro
174                           is  automatically  defined.   This  is  enabled  by
175                           default.  This warning will never occur in compati‐
176                           bility mode.
177
178       syntax        128   Dubious syntax in numeric expressions.
179
180       tab          2048   Inappropriate  use  of a tab character.  Either use
181                           of a tab character where a number was expected,  or
182                           use of tab character in an unquoted macro argument.
183
184       There are also names that can be used to refer to groups of warnings:
185
186       all    All  warnings except di, mac, and reg.  It is intended that this
187              covers all warnings that are useful with traditional macro pack‐
188              ages.
189
190       w      All warnings.
191

ENVIRONMENT

193       GROFF_TMAC_PATH
194              A  colon  separated  list  of directories in which to search for
195              macro files.  troff will scan directories given in the -M option
196              before  these, and in standard directories (current directory if
197              in  unsafe  mode,  home  directory,  /usr/lib64/groff/site-tmac,
198              /usr/share/groff/site-tmac,      /usr/share/groff/1.18.1.4/tmac)
199              after these.
200
201       GROFF_TYPESETTER
202              Default device.
203
204       GROFF_FONT_PATH
205              A colon separated list of directories in which to search for the
206              devname  directory.  troff will scan directories given in the -F
207              option   before   these,    and    in    standard    directories
208              (/usr/share/groff/site-font,     /usr/share/groff/1.18.1.4/font,
209              /usr/lib/font) after these.
210

FILES

212       /usr/share/groff/1.18.1.4/tmac/troffrc
213              Initialization file (called before any other macro package).
214
215       /usr/share/groff/1.18.1.4/tmac/troffrc-end
216              Initialization file (called after any other macro package).
217
218       /usr/share/groff/1.18.1.4/tmac/name.tmac
219       /usr/share/groff/1.18.1.4/tmac/tmac.name
220              Macro files
221
222       /usr/share/groff/1.18.1.4/font/devname/DESC
223              Device description file for device name.
224
225       /usr/share/groff/1.18.1.4/font/devname/F
226              Font file for font F of device name.
227
228       Note that troffrc and troffrc-end are neither searched in  the  current
229       nor  in the home directory by default for security reasons (even if the
230       -U  option  is  given).   Use  the  -M  command  line  option  or   the
231       GROFF_TMAC_PATH  environment  variable  to add these directories to the
232       search path if necessary.
233

AUTHOR

235       Copyright (C) 1989, 2001, 2002 Free Software Foundation, Inc.
236
237       This document is distributed under the terms of the FDL (GNU Free Docu‐
238       mentation  License)  version  1.1 or later.  You should have received a
239       copy of the FDL on your system, it is also available on-line at the GNU
240       copyleft  site  ⟨http://www.gnu.org/copyleft/fdl.html⟩.   This document
241       was written by James Clark,  with  modifications  from  Werner  Lemberg
242       ⟨wl@gnu.org⟩ and Bernd Warken ⟨bwarken@mayn.de⟩
243
244       This document is part of groff, the GNU roff distribution.
245

SEE ALSO

247       groff(1)
248              The main program of the groff system, a wrapper around troff.
249
250       groff(7)
251              A  description of the groff language, including a short but com‐
252              plete reference  of  all  predefined  requests,  registers,  and
253              escapes  of  plain groff.  From the command line, this is called
254              by
255
256                     man 7 groff
257
258       groff_diff(7)
259              The differences of the groff language and  the  classical  troff
260              language.   Currently,  this  is the most actual document of the
261              groff system.
262
263       roff(7)
264              An overview over groff and other roff systems, including  point‐
265              ers to further related documentation.
266
267       The  groff  info  file,  cf.  info(1), presents all groff documentation
268       within a single document.
269
270
271
272Groff Version 1.18.1.4         16 September 2002                      TROFF(1)
Impressum