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

NAME

6       grotty - groff driver for typewriter-like devices
7

SYNOPSIS

9       grotty [-bBcdfhioruUv] [-F dir] [file ...]
10

DESCRIPTION

12       grotty  translates  the  output  of  GNU troff into a form suitable for
13       typewriter-like devices.  Normally grotty should be  invoked  by  using
14       the  groff  command  with a -Tascii, -Tlatin1 or -Tutf8 option on ASCII
15       based systems, and with -Tcp1047 and -Tutf8 on EBCDIC based hosts.   If
16       no  files  are given, grotty reads the standard input.  A filename of -
17       also causes grotty to read the standard input.  Output  is  written  to
18       the standard output.
19
20       By  default,  grotty  emits  SGR  escape sequences (from ISO 6429, also
21       called ANSI color escapes) to change  text  attributes  (bold,  italic,
22       colors).  This makes it possible to have eight different background and
23       foreground colors; additionally, bold and italic attributes can be used
24       at the same time (by using the BI font).
25
26       The following colors are defined in tty.tmac: black, white, red, green,
27       blue, yellow, magenta, cyan.  Unknown colors are mapped to the  default
28       color  (which  is  dependent  on  the settings of the terminal; in most
29       cases, this is black for the foreground and white for the background).
30
31       Use the -c switch to revert to the old behaviour, printing a bold char‐
32       acter  c with the sequence “c BACKSPACE c” and an italic character c by
33       the sequence “_ BACKSPACE c”.  At the same time, color output  is  dis‐
34       abled.   The  same  effect  can  be  achieved  by  setting  either  the
35       GROFF_NO_SGR environment variable or using the ‘sgr’ X command (see be‐
36       low).
37
38       For  SGR  support,  it  is necessary to use the -R option of less(1) to
39       disable the interpretation  of  grotty's  old  output  format.   Conse‐
40       quently,  all programs which use less as the pager program have to pass
41       this option to it.  For man(1) in particular,  either  add  -R  to  the
42       PAGER environment variable, e.g.
43
44              PAGER="/usr/bin/less -R"
45              export PAGER
46
47       or  use  the  -P  option of man to set the pager executable and its op‐
48       tions, or modify the configuration file of man in  a  similar  fashion.
49       Note that with some man(1) versions, you have to use the MANPAGER envi‐
50       ronment variable instead.
51
52       grotty's old output format can be displayed on  a  terminal  by  piping
53       through ul(1).  Pagers such as more(1) or less(1) are also able to dis‐
54       play these sequences.  Use either -B or -U when  piping  into  less(1);
55       use -b when piping into more(1).  There is no need to filter the output
56       through col(1) since grotty never outputs reverse line feeds.
57
58       The font description file may contain a command
59
60              internalname n
61
62       where n is a decimal integer.  If the 01 bit in n is set, then the font
63       is  treated as an italic font; if the 02 bit is set, then it is treated
64       as a bold font.  The code field in the font description field gives the
65       code which is used to output the character.  This code can also be used
66       in the \N escape sequence in troff.
67
68       If the DESC file contains the keyword  unicode,  grotty  emits  Unicode
69       characters in UTF-8 encoding.  Otherwise, it emits characters in a sin‐
70       gle-byte encoding depending on the data in the font description  files.
71       See the groff_font(5) man page for more details.
72

OPTIONS

74       Whitespace is permitted between a command-line option and its argument.
75
76       -b     Suppress  the  use of overstriking for bold characters.  Ignored
77              if -c isn't used.
78
79       -B     Use only overstriking for bold-italic characters.  Ignored if -c
80              isn't used.
81
82       -c     Use  grotty's old output format (see above).  This also disables
83              color output.
84
85       -d     Ignore all \D commands.  Without this  grotty  renders  \D'l...'
86              commands that have at least one zero argument (and so are either
87              horizontal or vertical) using -, |, and + characters.  In a sim‐
88              ilar  way,  grotty  handles  \D'p...' commands which consist en‐
89              tirely of horizontal and vertical lines.
90
91       -f     Use form feeds in the output.  A form feed is output at the  end
92              of each page that has no output on its last line.
93
94       -Fdir  Prepend  directory  dir/devname  to the search path for font and
95              device description files; name is the name of the  device,  usu‐
96              ally ascii, latin1, utf8, or cp1047.
97
98       -h     Use  horizontal  tabs in the output.  Tabs are assumed to be set
99              every 8 columns.
100
101       -i     Use escape sequences to set the italic text attribute instead of
102              the  underline  attribute for italic fonts (‘I’ and ‘BI’).  Note
103              that most terminals (including xterm) don't support  this.   Ig‐
104              nored if -c is active.
105
106       -o     Suppress overstriking (other than for bold or underlined charac‐
107              ters in case the old output format has been activated with -c).
108
109       -r     Use escape sequences to set the reverse text  attribute  instead
110              of the underline attribute for italic fonts (‘I’ and ‘BI’).  Ig‐
111              nored if -c is active.
112
113       -u     Suppress the use of underlining for italic characters.   Ignored
114              if -c isn't used.
115
116       -U     Use  only underlining for bold-italic characters.  Ignored if -c
117              isn't used.
118
119       -v     Print the version number.
120

USAGE

122       grotty understands a single X command produced using the \X escape  se‐
123       quence.
124
125       \X'tty: sgr n'
126              If  n is non-zero or missing, enable SGR output (this is the de‐
127              fault), otherwise use the old drawing scheme for bold and under‐
128              line.
129

ENVIRONMENT

131       GROFF_NO_SGR
132              If set, the old drawing scheme for bold and underline (using the
133              backspace character) is active.  Colors are disabled.
134
135       GROFF_FONT_PATH
136              A list of directories in which to search for the devname  direc‐
137              tory  in  addition  to  the  default  ones.   See  troff(1)  and
138              groff_font(5) for more details.
139

FILES

141       /usr/share/groff/1.22.4/font/devascii/DESC
142              Device description file for the ascii device.
143
144       /usr/share/groff/1.22.4/font/devascii/F
145              Font description file for font F of the ascii device.
146
147       /usr/share/groff/1.22.4/font/devlatin1/DESC
148              Device description file for the latin1 device.
149
150       /usr/share/groff/1.22.4/font/devlatin1/F
151              Font description file for font F of the latin1 device.
152
153       /usr/share/groff/1.22.4/font/devutf8/DESC
154              Device description file for the utf8 device.
155
156       /usr/share/groff/1.22.4/font/devutf8/F
157              Font description file for font F of the utf8 device.
158
159       /usr/share/groff/1.22.4/font/devcp1047/DESC
160              Device description file for the cp1047 device.
161
162       /usr/share/groff/1.22.4/font/devcp1047/F
163              Font description file for font F of the cp1047 device.
164
165       /usr/share/groff/1.22.4/tmac/tty.tmac
166              Macros for use with grotty.
167
168       /usr/share/groff/1.22.4/tmac/tty-char.tmac
169              Additional character definitions for use with grotty.
170
171       Note that on EBCDIC hosts, only files for  the  cp1047  device  is  in‐
172       stalled.
173

BUGS

175       grotty is intended only for simple documents.
176
177       There is no support for fractional horizontal or vertical motions.
178
179       There  is no support for \D commands other than horizontal and vertical
180       lines.
181
182       Characters above the first line (i.e. with a vertical  position  of  0)
183       cannot be printed.
184
185       Color  handling  differs  from grops(1).  \M doesn't set the fill color
186       for closed graphic objects (which grotty doesn't  support  anyway)  but
187       changes  the background color of the character cell, affecting all sub‐
188       sequent operations.
189

SEE ALSO

191       groff(1), troff(1), groff_out(5), groff_font(5), groff_char(7),  ul(1),
192       more(1), man(1), less(1)
193
194
195
196groff 1.22.4                     17 March 2021                       GROTTY(1)
Impressum