Add the new -r option to grotty. It is similar to the -i option
[s-roff.git] / src / devices / grotty / grotty.man
blob198ca47329956b5f0986a2be574f5bc91b0a78bc
1 .ig
2 Copyright (C) 1989-2000, 2001, 2002 Free Software Foundation, Inc.
4 Permission is granted to make and distribute verbatim copies of
5 this manual provided the copyright notice and this permission notice
6 are preserved on all copies.
8 Permission is granted to copy and distribute modified versions of this
9 manual under the conditions for verbatim copying, provided that the
10 entire resulting derived work is distributed under the terms of a
11 permission notice identical to this one.
13 Permission is granted to copy and distribute translations of this
14 manual into another language, under the above conditions for modified
15 versions, except that this permission notice may be included in
16 translations approved by the Free Software Foundation instead of in
17 the original English.
21 .TH GROTTY @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
22 .SH NAME
23 grotty \- groff driver for typewriter-like devices
26 .SH SYNOPSIS
27 .B grotty
29 .B \-bBcdfhioruUv
30 ] [
31 .BI \-F dir
32 ] [
33 .IR files \|.\|.\|.\&
35 .PP
36 It is possible to have whitespace between the
37 .B \-F
38 option and its parameter.
41 .SH DESCRIPTION
42 .B grotty
43 translates the output of GNU
44 .B troff
45 into a form suitable for typewriter-like devices.
46 Normally
47 .B grotty
48 should be invoked by using the
49 .B groff
50 command
51 with a
52 .BR \-Tascii ,
53 .B \-Tlatin1
55 .B \-Tutf8
56 option on ASCII based systems, and with
57 .B \-Tcp1047
58 and
59 .B \-Tutf8
60 on EBCDIC based hosts.
61 If no files are given,
62 .B grotty
63 will read the standard input.
64 A filename of
65 .B \-
66 will also cause
67 .B grotty
68 to read the standard input.
69 Output is written to the standard output.
70 .LP
71 By default,
72 .B grotty
73 emits SGR escape sequences (from ISO 6429, also called ANSI color escapes)
74 to change text attributes (bold, italic, colors).
75 This makes it possible to have eight different \M[green]background\M[]
76 and \m[red]foreground\m[] colors; additionally, bold and italic
77 attributes can be used \f[BI]at the same time\f[] (by using the BI font).
78 .LP
79 The following colors are defined in
80 .BR tty.tmac :
81 black, white, red, green, blue, yellow, magenta, cyan.
82 Unknown colors are mapped to the default color (which is dependent on the
83 settings of the terminal; in most cases, this is black for the foreground
84 and white for the background).
85 .LP
86 Use the
87 .B \-c
88 switch to revert to the old behaviour, printing a bold character
89 .I c
90 with the sequence
91 .RI ` c
92 .SM BACKSPACE
93 .IR c '
94 and an italic character
95 .I c
96 by the sequence
97 .RB ` _
98 .SM BACKSPACE
99 .IR c '.
100 At the same time, color output is disabled.
101 The same effect can be achieved by setting either the
102 .B GROFF_NO_SGR
103 environment variable or using the `sgr' X command (see below).
105 For SGR support, it is necessary to use the
106 .B \-R
107 option of
108 .BR less (1)
109 to disable the interpretation of
110 .BR grotty 's
111 old output format.
112 Consequently, all programs which use
113 .B less
114 as the pager program have to pass this option to it.
116 .BR man (1)
117 in particular, either add
118 .B \-R
119 to the
120 .B $PAGER
121 environment variable, e.g.\&
124 .B PAGER="/usr/bin/less -R"
126 .B export PAGER
129 or use the
130 .B \-P
131 option of
132 .B man
133 to set the pager executable and its options, or modify the configuration
134 file of
135 .B man
136 in a similar fashion.
138 .BR grotty 's
139 old output format can be displayed on a terminal
140 by piping through
141 .BR ul (1).
142 Pagers such as
143 .BR more (1)
145 .BR less (1)
146 are also able to display these sequences.
147 Use either
148 .B \-B
150 .B \-U
151 when piping into
152 .BR less (1);
154 .B \-b
155 when piping into
156 .BR more (1).
157 There is no need to filter the output through
158 .BR col (1)
159 since
160 .B grotty
161 never outputs reverse line feeds.
163 The font description file may contain a command
165 .BI internalname\  n
167 where
168 .I n
169 is a decimal integer.
170 If the 01 bit in
171 .I n
172 is set,
173 then the font will be treated as an italic font;
174 if the 02 bit is set,
175 then it will be treated as a bold font.
176 The code field in the font description field gives the
177 code which will be used to output the character.
178 This code can also be used in the
179 .B \[rs]N
180 escape sequence in
181 .BR troff .
184 .SH OPTIONS
186 .B \-b
187 Suppress the use of overstriking for bold characters.
188 Ignored if
189 .B \-c
190 isn't used.
193 .B \-B
194 Use only overstriking for bold-italic characters.
195 Ignored if
196 .B \-c
197 isn't used.
200 .B \-c
202 .BR grotty 's
203 old output format (see above).
204 This also disables color output.
207 .B \-d
208 Ignore all
209 .B \[rs]D
210 commands.
211 Without this
212 .B grotty
213 will render
214 .B \[rs]D'l\|.\|.\|.\&'
215 commands that have at least one zero argument
216 (and so are either horizontal or vertical)
217 using
218 .BR \- ,
219 .BR | ,
221 .B +
222 characters.
225 .B \-f
226 Use form feeds in the output.
227 A form feed will be output at the end of each page that has no output
228 on its last line.
231 .BI \-F dir
232 Prepend directory
233 .IB dir /dev name
234 to the search path for font and device description files;
235 .I name
236 is the name of the device, usually
237 .BR ascii ,
238 .BR latin1 ,
239 .BR utf8 ,
241 .BR cp1047 .
243 .B \-h
244 Use horizontal tabs in the output.
245 Tabs are assumed to be set every 8 columns.
248 .B \-i
249 Use escape sequences to set the italic text attribute instead of the
250 underline attribute for italic fonts (`I' and `BI').
251 Note that most terminals (including xterm) don't support this.
252 Ignored if
253 .B \-c
254 is active.
257 .B \-o
258 Suppress overstriking (other than for bold or underlined characters in
259 case the old output format has been activated with
260 .BR \-c ).
263 .B \-r
264 Use escape sequences to set the reverse text attribute instead of the
265 underline attribute for italic fonts (`I' and `BI').
266 Ignored if
267 .B \-c
268 is active.
271 .B \-u
272 Suppress the use of underlining for italic characters.
273 Ignored if
274 .B \-c
275 isn't used.
278 .B \-U
279 Use only underlining for bold-italic characters.
280 Ignored if
281 .B \-c
282 isn't used.
285 .B \-v
286 Print the version number.
289 .SH USAGE
290 .B grotty
291 understands a single X command produced using the
292 .B \[rs]X
293 escape sequence.
295 .BI \[rs]X'tty:\ sgr\  n '
297 .I n
298 is non-zero or missing, enable SGR output (this is the default), otherwise
299 use the old drawing scheme for bold and underline.
302 .SH ENVIRONMENT
304 .B GROFF_NO_SGR
305 If set, the old drawing scheme for bold and underline (using the
306 backspace character) is active.
307 Colors are disabled.
310 .SH FILES
312 .B @FONTDIR@/devascii/DESC
313 Device description file for
314 .B ascii
315 device.
318 .BI @FONTDIR@/devascii/ F
319 Font description file for font
320 .I F
322 .B ascii
323 device.
326 .B @FONTDIR@/devlatin1/DESC
327 Device description file for
328 .B latin1
329 device.
332 .BI @FONTDIR@/devlatin1/ F
333 Font description file for font
334 .I F
336 .B latin1
337 device.
340 .B @FONTDIR@/devutf8/DESC
341 Device description file for
342 .B utf8
343 device.
346 .BI @FONTDIR@/devutf8/ F
347 Font description file for font
348 .I F
350 .B utf8
351 device.
354 .B @FONTDIR@/devcp1047/DESC
355 Device description file for
356 .B cp1047
357 device.
360 .BI @FONTDIR@/devcp1047/ F
361 Font description file for font
362 .I F
364 .B cp1047
365 device.
368 .B @MACRODIR@/tty.tmac
369 Macros for use with
370 .BR grotty .
373 .B @MACRODIR@/tty-char.tmac
374 Additional klugdey character definitions for use with
375 .BR grotty .
377 Note that on EBCDIC hosts, only files for the
378 .B cp1047
379 device will be installed.
382 .SH BUGS
384 .B grotty
385 is intended only for simple documents.
387 There is no support for fractional horizontal or vertical motions.
389 There is no support for
390 .B \[rs]D
391 commands
392 other than horizontal and vertical lines.
394 Characters above the first line (ie with a vertical position of\~0)
395 cannot be printed.
397 Color handling is different compared to
398 .BR grops (@MAN1EXT@).
399 .B \[rs]M
400 doesn't set the fill color for closed graphic objects (which
401 .B grotty
402 doesn't support anyway) but changes the background color of the character
403 cell, affecting all subsequent operations.
406 .SH "SEE ALSO"
407 .BR groff (@MAN1EXT@),
408 .BR @g@troff (@MAN1EXT@),
409 .BR groff_out (@MAN5EXT@),
410 .BR groff_font (@MAN5EXT@),
411 .BR groff_char (@MAN7EXT@),
412 .BR ul (1),
413 .BR more (1),
414 .BR man (1),
415 .BR less (1)
417 .\" Local Variables:
418 .\" mode: nroff
419 .\" End: