1GROTTY(1) General Commands Manual GROTTY(1)
2
3
4
6 grotty - groff driver for typewriter-like devices
7
9 grotty [ -bBcdfhioruUv ] [ -Fdir ] [ files... ]
10
11 It is possible to have whitespace between the -F option and its parame‐
12 ter.
13
15 grotty translates the output of GNU troff into a form suitable for
16 typewriter-like devices. Normally grotty should be invoked by using
17 the groff command with a -Tascii, -Tlatin1 or -Tutf8 option on ASCII
18 based systems, and with -Tcp1047 and -Tutf8 on EBCDIC based hosts. If
19 no files are given, grotty reads the standard input. A filename of -
20 also causes grotty to read the standard input. Output is written to
21 the standard output.
22
23 By default, grotty emits SGR escape sequences (from ISO 6429, also
24 called ANSI color escapes) to change text attributes (bold, italic,
25 colors). This makes it possible to have eight different background and
26 foreground colors; additionally, bold and italic attributes can be used
27 at the same time (by using the BI font).
28
29 The following colors are defined in tty.tmac: black, white, red, green,
30 blue, yellow, magenta, cyan. Unknown colors are mapped to the default
31 color (which is dependent on the settings of the terminal; in most
32 cases, this is black for the foreground and white for the background).
33
34 Use the -c switch to revert to the old behaviour, printing a bold char‐
35 acter c with the sequence `c BACKSPACE c' and an italic character c by
36 the sequence `_ BACKSPACE c'. At the same time, color output is dis‐
37 abled. The same effect can be achieved by setting either the
38 GROFF_NO_SGR environment variable or using the `sgr' X command (see
39 below).
40
41 For SGR support, it is necessary to use the -R option of less(1) to
42 disable the interpretation of grotty's old output format. Conse‐
43 quently, all programs which use less as the pager program have to pass
44 this option to it. For man(1) in particular, either add -R to the
45 $PAGER environment variable, e.g.
46
47 PAGER="/usr/bin/less -R"
48 export PAGER
49
50 or use the -P option of man to set the pager executable and its
51 options, or modify the configuration file of man in a similar fashion.
52 Note that with some man(1) versions, you have to use the $MANPAGER
53 environment variable instead.
54
55 grotty's old output format can be displayed on a terminal by piping
56 through ul(1). Pagers such as more(1) or less(1) are also able to dis‐
57 play these sequences. Use either -B or -U when piping into less(1);
58 use -b when piping into more(1). There is no need to filter the output
59 through col(1) since grotty never outputs reverse line feeds.
60
61 The font description file may contain a command
62
63 internalname n
64
65 where n is a decimal integer. If the 01 bit in n is set, then the font
66 is treated as an italic font; if the 02 bit is set, then it is treated
67 as a bold font. The code field in the font description field gives the
68 code which is used to output the character. This code can also be used
69 in the \N escape sequence in troff.
70
72 -b Suppress the use of overstriking for bold characters. Ignored
73 if -c isn't used.
74
75 -B Use only overstriking for bold-italic characters. Ignored if -c
76 isn't used.
77
78 -c Use grotty's old output format (see above). This also disables
79 color output.
80
81 -d Ignore all \D commands. Without this grotty renders \D'l...'
82 commands that have at least one zero argument (and so are either
83 horizontal or vertical) using -, |, and + characters. In a sim‐
84 ilar way, grotty handles \D'p...' commands which consist
85 entirely of horizontal and vertical lines.
86
87 -f Use form feeds in the output. A form feed is output at the end
88 of each page that has no output on its last line.
89
90 -Fdir Prepend directory dir/devname to the search path for font and
91 device description files; name is the name of the device, usu‐
92 ally ascii, latin1, utf8, or cp1047.
93
94 -h Use horizontal tabs in the output. Tabs are assumed to be set
95 every 8 columns.
96
97 -i Use escape sequences to set the italic text attribute instead of
98 the underline attribute for italic fonts (`I' and `BI'). Note
99 that most terminals (including xterm) don't support this.
100 Ignored if -c is active.
101
102 -o Suppress overstriking (other than for bold or underlined charac‐
103 ters in case the old output format has been activated with -c).
104
105 -r Use escape sequences to set the reverse text attribute instead
106 of the underline attribute for italic fonts (`I' and `BI').
107 Ignored if -c is active.
108
109 -u Suppress the use of underlining for italic characters. Ignored
110 if -c isn't used.
111
112 -U Use only underlining for bold-italic characters. Ignored if -c
113 isn't used.
114
115 -v Print the version number.
116
118 grotty understands a single X command produced using the \X escape
119 sequence.
120
121 \X'tty: sgr n'
122 If n is non-zero or missing, enable SGR output (this is the
123 default), otherwise use the old drawing scheme for bold and
124 underline.
125
127 GROFF_NO_SGR
128 If set, the old drawing scheme for bold and underline (using the
129 backspace character) is active. Colors are disabled.
130
131 GROFF_FONT_PATH
132 A list of directories in which to search for the devname direc‐
133 tory in addition to the default ones. See troff(1) and
134 groff_font(5) for more details.
135
137 /usr/share/groff/1.20.1/font/devascii/DESC
138 Device description file for ascii device.
139
140 /usr/share/groff/1.20.1/font/devascii/F
141 Font description file for font F of ascii device.
142
143 /usr/share/groff/1.20.1/font/devlatin1/DESC
144 Device description file for latin1 device.
145
146 /usr/share/groff/1.20.1/font/devlatin1/F
147 Font description file for font F of latin1 device.
148
149 /usr/share/groff/1.20.1/font/devutf8/DESC
150 Device description file for utf8 device.
151
152 /usr/share/groff/1.20.1/font/devutf8/F
153 Font description file for font F of utf8 device.
154
155 /usr/share/groff/1.20.1/font/devcp1047/DESC
156 Device description file for cp1047 device.
157
158 /usr/share/groff/1.20.1/font/devcp1047/F
159 Font description file for font F of cp1047 device.
160
161 /usr/share/groff/1.20.1/tmac/tty.tmac
162 Macros for use with grotty.
163
164 /usr/share/groff/1.20.1/tmac/tty-char.tmac
165 Additional klugdey character definitions for use with grotty.
166
167 Note that on EBCDIC hosts, only files for the cp1047 device is
168 installed.
169
171 grotty is intended only for simple documents.
172
173 There is no support for fractional horizontal or vertical motions.
174
175 There is no support for \D commands other than horizontal and vertical
176 lines.
177
178 Characters above the first line (ie with a vertical position of 0) can‐
179 not be printed.
180
181 Color handling is different compared to grops(1). \M doesn't set the
182 fill color for closed graphic objects (which grotty doesn't support
183 anyway) but changes the background color of the character cell, affect‐
184 ing all subsequent operations.
185
187 groff(1), troff(1), groff_out(5), groff_font(5), groff_char(7), ul(1),
188 more(1), man(1), less(1)
189
190
191
192Groff Version 1.20.1 9 January 2009 GROTTY(1)