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] [-d cs] [-f fam] [-F dir] [-I dir] [-m name]
10             [-M dir] [-n num] [-o list] [-r cn] [-T name] [-w name] [-W name]
11             [file ...]
12

DESCRIPTION

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

OPTIONS

22       It is possible to have whitespace between a command line option and its
23       parameter.
24
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       -Idir     This option may be used to add a directory to the search path
56                 for  files (both those on the command line and those named in
57                 .psbb requests).  The search path  is  initialized  with  the
58                 current  directory.   This  option may be specified more than
59                 once; the directories are then searched in the  order  speci‐
60                 fied (but before the current directory).  If you want to make
61                 the current directory be read before other  directories,  add
62                 -I. at the appropriate place.
63
64                 No  directory  search is performed for files with an absolute
65                 file name.
66
67       -mname    Read in the file name.tmac.  If it isn't found, try tmac.name
68                 instead.   It will be first searched for in directories given
69                 with the -M command line option, then in directories given in
70                 the GROFF_TMAC_PATH environment variable, then in the current
71                 directory (only if  in  unsafe  mode),  the  home  directory,
72                 /usr/lib64/groff/site-tmac,  /usr/share/groff/site-tmac,  and
73                 /usr/share/groff/1.20.1/tmac.
74
75       -Mdir     Search directory (or directory path)  dir  for  macro  files.
76                 This is scanned before all other macro directories.
77
78       -nnum     Number the first page num.
79
80       -olist    Output only pages in list, which is a comma-separated list of
81                 page ranges; n means print page n, m-n means print every page
82                 between  m and n, -n means print every page up to n, n- means
83                 print every page from n.  troff will exit after printing  the
84                 last page in the list.
85
86       -rcn
87       -rname=n  Set number register c or name to n; c must be a one character
88                 name; n can be any troff numeric expression.
89
90       -R        Don't load troffrc and troffrc-end.
91
92       -Tname    Prepare output for device name, rather than the  default  ps;
93                 see groff(1) for a more detailed description.
94
95       -U        Unsafe  mode.  This will enable the following requests: open,
96                 opena, pso, sy, and pi.  For security reasons,  these  poten‐
97                 tially  dangerous  requests  are disabled otherwise.  It will
98                 also add the current directory to the macro search path.
99
100       -v        Print the version number.
101
102       -wname    Enable warning name.  Available warnings are described in the
103                 section WARNINGS below.  For example, to enable all warnings,
104                 use -w all.  Multiple -w options are allowed.
105
106       -Wname    Inhibit warning name.  Multiple -W options are allowed.
107
108       -z        Suppress formatted output.
109

WARNINGS

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

ENVIRONMENT

206       GROFF_TMAC_PATH
207              A colon separated list of directories in  which  to  search  for
208              macro files.  troff will scan directories given in the -M option
209              before these, and in standard directories (current directory  if
210              in  unsafe  mode,  home  directory,  /usr/lib64/groff/site-tmac,
211              /usr/share/groff/site-tmac, /usr/share/groff/1.20.1/tmac)  after
212              these.
213
214       GROFF_TYPESETTER
215              Default device.
216
217       GROFF_FONT_PATH
218              A colon separated list of directories in which to search for the
219              devname directory.  troff will scan directories given in the  -F
220              option    before    these,    and    in   standard   directories
221              (/usr/share/groff/site-font,       /usr/share/groff/1.20.1/font,
222              /usr/lib/font) after these.
223

FILES

225       /usr/share/groff/1.20.1/tmac/troffrc
226              Initialization file (called before any other macro package).
227
228       /usr/share/groff/1.20.1/tmac/troffrc-end
229              Initialization file (called after any other macro package).
230
231       /usr/share/groff/1.20.1/tmac/name.tmac
232       /usr/share/groff/1.20.1/tmac/tmac.name
233              Macro files
234
235       /usr/share/groff/1.20.1/font/devname/DESC
236              Device description file for device name.
237
238       /usr/share/groff/1.20.1/font/devname/F
239              Font file for font F of device name.
240
241       Note  that  troffrc and troffrc-end are neither searched in the current
242       nor in the home directory by default for security reasons (even if  the
243       -U   option  is  given).   Use  the  -M  command  line  option  or  the
244       GROFF_TMAC_PATH environment variable to add these  directories  to  the
245       search path if necessary.
246

AUTHOR

248       Copyright  (C)  1989,  2001, 2002, 2003, 2007, 2008, 2009 Free Software
249       Foundation, Inc.
250
251       This document is distributed under the terms of the FDL (GNU Free Docu‐
252       mentation  License)  version  1.3 or later.  You should have received a
253       copy of the FDL on your system, it is also available on-line at the GNU
254       copyleft  site  ⟨http://www.gnu.org/copyleft/fdl.html⟩.   This document
255       was written by James Clark,  with  modifications  from  Werner  Lemberg
256       ⟨wl@gnu.org⟩ and Bernd Warken ⟨bwarken@mayn.de⟩.
257
258       This document is part of groff, the GNU roff distribution.
259

SEE ALSO

261       groff(1)
262              The main program of the groff system, a wrapper around troff.
263
264       groff(7)
265              A  description of the groff language, including a short but com‐
266              plete reference  of  all  predefined  requests,  registers,  and
267              escapes  of  plain groff.  From the command line, this is called
268              by
269
270                     man 7 groff
271
272       groff_diff(7)
273              The differences of the groff language and  the  classical  troff
274              language.   Currently,  this  is the most actual document of the
275              groff system.
276
277       roff(7)
278              An overview over groff and other roff systems, including  point‐
279              ers to further related documentation.
280
281       The  groff  info  file,  cf.  info(1), presents all groff documentation
282       within a single document.
283
284
285
286Groff Version 1.20.1            9 January 2009                        TROFF(1)
Impressum