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

Name

6       nroff - format documents with groff for TTY (terminal) devices
7

Synopsis

9       nroff [-bcCEhikpRStUVz] [-d ctext] [-d string=text] [-K fallback-
10             encoding] [-m macro-package] [-M macro-directory] [-n page-
11             number] [-o page-list] [-P postprocessor-argument] [-r cnumeric-
12             expression] [-r register=numeric-expression] [-T output-device]
13             [-w warning-category] [-W warning-category] [file ...]
14
15       nroff --help
16
17       nroff -v
18       nroff --version
19

Description

21       nroff  formats  documents  written  in  the groff(7) language for type‐
22       writer-like devices such as terminal emulators.  GNU nroff emulates the
23       AT&T   nroff  command  using  groff(1).   nroff  generates  output  via
24       grotty(1), groff's terminal output driver,  which  needs  to  know  the
25       character encoding scheme used by the device.  Consequently, acceptable
26       arguments to the -T option are ascii, latin1,  utf8,  and  cp1047;  any
27       others  are ignored.  If neither the GROFF_TYPESETTER environment vari‐
28       able nor the -T command-line option (which  overrides  the  environment
29       variable)  specifies a (valid) device, nroff consults the locale to se‐
30       lect an appropriate output device.  It first tries the  locale(1)  pro‐
31       gram,  then  checks  several  locale-related environment variables; see
32       section “Environment” below.  If all of the foregoing fail, -Tascii  is
33       implied.
34
35       The  -b, -c, -C, -d, -E, -i, -m, -M, -n, -o, -r, -U, -w, -W, and -z op‐
36       tions have the effects described in troff(1).  -c and -h  imply  “-P-c
37       and “-P-h”, respectively; -c is also interpreted directly by troff.  In
38       addition, this implementation ignores the AT&T nroff  options  -e,  -q,
39       and  -s  (which are not implemented in groff).  The options -k, -K, -p,
40       -P, -R, -t, and -S are documented in groff(1).  -V causes nroff to dis‐
41       play  the  constructed groff command on the standard output stream, but
42       does not execute it.  -v and --version show version  information  about
43       nroff  and the programs it runs, while --help displays a usage message;
44       all exit afterward.
45

Exit status

47       nroff exits with error status 2 if there was a problem parsing its  ar‐
48       guments,  with  status  0  if  any of the options -V, -v, --version, or
49       --help were specified, and with the status of groff otherwise.
50

Environment

52       Normally, the path separator in environment variables ending with  PATH
53       is the colon; this may vary depending on the operating system.  For ex‐
54       ample, Windows uses a semicolon instead.
55
56       GROFF_BIN_PATH
57              is a colon-separated list of directories in which to search  for
58              the  groff executable before searching in PATH.  If unset, /usr/
59              bin is used.
60
61       GROFF_TYPESETTER
62              specifies the default output device for groff.
63
64       LC_ALL
65       LC_CTYPE
66       LANG
67       LESSCHARSET
68              are pattern-matched in this order for contents matching standard
69              character encodings supported by groff in the event no -T option
70              is given and GROFF_TYPESETTER is unset, or the values  specified
71              are invalid.
72

Files

74       /usr/share/groff/1.23.0/tmac/tty-char.tmac
75              defines  fallback definitions of roff special characters.  These
76              definitions more poorly  optically  approximate  typeset  output
77              than those of tty.tmac in favor of communicating semantic infor‐
78              mation.  nroff loads it automatically.
79

Notes

81       Pager programs like more(1) and less(1) may  require  command-line  op‐
82       tions to correctly handle some output sequences; see grotty(1).
83

See also

85       groff(1), troff(1), grotty(1), locale(1), roff(7)
86
87
88
89groff 1.23.0                    2 November 2023                       nroff(1)
Impressum