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
71 If the DESC file contains the keyword unicode, grotty emits Unicode
72 characters in UTF-8 encoding. Otherwise, it emits characters in a sin‐
73 gle-byte encoding depending on the data in the font description files.
74 See the groff_font(5) man page for more details.
75
77 -b Suppress the use of overstriking for bold characters. Ignored
78 if -c isn't used.
79
80 -B Use only overstriking for bold-italic characters. Ignored if -c
81 isn't used.
82
83 -c Use grotty's old output format (see above). This also disables
84 color output.
85
86 -d Ignore all \D commands. Without this grotty renders \D'l...'
87 commands that have at least one zero argument (and so are either
88 horizontal or vertical) using -, |, and + characters. In a sim‐
89 ilar way, grotty handles \D'p...' commands which consist
90 entirely of horizontal and vertical lines.
91
92 -f Use form feeds in the output. A form feed is output at the end
93 of each page that has no output on its last line.
94
95 -Fdir Prepend directory dir/devname to the search path for font and
96 device description files; name is the name of the device, usu‐
97 ally ascii, latin1, utf8, or cp1047.
98
99 -h Use horizontal tabs in the output. Tabs are assumed to be set
100 every 8 columns.
101
102 -i Use escape sequences to set the italic text attribute instead of
103 the underline attribute for italic fonts (`I' and `BI'). Note
104 that most terminals (including xterm) don't support this.
105 Ignored if -c is active.
106
107 -o Suppress overstriking (other than for bold or underlined charac‐
108 ters in case the old output format has been activated with -c).
109
110 -r Use escape sequences to set the reverse text attribute instead
111 of the underline attribute for italic fonts (`I' and `BI').
112 Ignored if -c is active.
113
114 -u Suppress the use of underlining for italic characters. Ignored
115 if -c isn't used.
116
117 -U Use only underlining for bold-italic characters. Ignored if -c
118 isn't used.
119
120 -v Print the version number.
121
123 grotty understands a single X command produced using the \X escape
124 sequence.
125
126 \X'tty: sgr n'
127 If n is non-zero or missing, enable SGR output (this is the
128 default), otherwise use the old drawing scheme for bold and
129 underline.
130
132 GROFF_NO_SGR
133 If set, the old drawing scheme for bold and underline (using the
134 backspace character) is active. Colors are disabled.
135
136 GROFF_FONT_PATH
137 A list of directories in which to search for the devname direc‐
138 tory in addition to the default ones. See troff(1) and
139 groff_font(5) for more details.
140
142 /usr/share/groff/1.22.2/font/devascii/DESC
143 Device description file for ascii device.
144
145 /usr/share/groff/1.22.2/font/devascii/F
146 Font description file for font F of ascii device.
147
148 /usr/share/groff/1.22.2/font/devlatin1/DESC
149 Device description file for latin1 device.
150
151 /usr/share/groff/1.22.2/font/devlatin1/F
152 Font description file for font F of latin1 device.
153
154 /usr/share/groff/1.22.2/font/devutf8/DESC
155 Device description file for utf8 device.
156
157 /usr/share/groff/1.22.2/font/devutf8/F
158 Font description file for font F of utf8 device.
159
160 /usr/share/groff/1.22.2/font/devcp1047/DESC
161 Device description file for cp1047 device.
162
163 /usr/share/groff/1.22.2/font/devcp1047/F
164 Font description file for font F of cp1047 device.
165
166 /usr/share/groff/1.22.2/tmac/tty.tmac
167 Macros for use with grotty.
168
169 /usr/share/groff/1.22.2/tmac/tty-char.tmac
170 Additional klugdey character definitions for use with grotty.
171
172 Note that on EBCDIC hosts, only files for the cp1047 device is
173 installed.
174
176 grotty is intended only for simple documents.
177
178 There is no support for fractional horizontal or vertical motions.
179
180 There is no support for \D commands other than horizontal and vertical
181 lines.
182
183 Characters above the first line (ie with a vertical position of 0) can‐
184 not be printed.
185
186 Color handling is different compared to grops(1). \M doesn't set the
187 fill color for closed graphic objects (which grotty doesn't support
188 anyway) but changes the background color of the character cell, affect‐
189 ing all subsequent operations.
190
192 groff(1), troff(1), groff_out(5), groff_font(5), groff_char(7), ul(1),
193 more(1), man(1), less(1)
194
195
196
197Groff Version 1.22.2 7 February 2013 GROTTY(1)