* aclocal.m4 (GROFF_EBCDIC): Don't include `font/devutf8' in
[s-roff.git] / src / devices / grotty / grotty.man
blob0f0e24e9000076b49cfe98e56150db507fd4d85a
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 \-bBcdfhiouUv
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 have eight different \M[green]background\M[P]
76 and \m[red]foreground\m[P] colors; additionally, bold and italic
77 attributes can be used \f[BI]at the same time\f[P] (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 the
102 .B GROFF_NO_SGR
103 environment variable.
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 \-u
264 Suppress the use of underlining for italic characters.
265 Ignored if
266 .B \-c
267 isn't used.
270 .B \-U
271 Use only underlining for bold-italic characters.
272 Ignored if
273 .B \-c
274 isn't used.
277 .B \-v
278 Print the version number.
281 .SH ENVIRONMENT
283 .B GROFF_NO_SGR
284 If set, the old drawing scheme for bold and underline (using the
285 backspace character) is active.
286 Colors are disabled.
289 .SH FILES
291 .B @FONTDIR@/devascii/DESC
292 Device description file for
293 .B ascii
294 device.
297 .BI @FONTDIR@/devascii/ F
298 Font description file for font
299 .I F
301 .B ascii
302 device.
305 .B @FONTDIR@/devlatin1/DESC
306 Device description file for
307 .B latin1
308 device.
311 .BI @FONTDIR@/devlatin1/ F
312 Font description file for font
313 .I F
315 .B latin1
316 device.
319 .B @FONTDIR@/devutf8/DESC
320 Device description file for
321 .B utf8
322 device.
325 .BI @FONTDIR@/devutf8/ F
326 Font description file for font
327 .I F
329 .B utf8
330 device.
333 .B @FONTDIR@/devcp1047/DESC
334 Device description file for
335 .B cp1047
336 device.
339 .BI @FONTDIR@/devcp1047/ F
340 Font description file for font
341 .I F
343 .B cp1047
344 device.
347 .B @MACRODIR@/tty.tmac
348 Macros for use with
349 .BR grotty .
352 .B @MACRODIR@/tty-char.tmac
353 Additional klugdey character definitions for use with
354 .BR grotty .
356 Note that on EBCDIC hosts, only files for the
357 .B cp1047
358 device will be installed.
361 .SH BUGS
363 .B grotty
364 is intended only for simple documents.
366 There is no support for fractional horizontal or vertical motions.
368 There is no support for
369 .B \[rs]D
370 commands
371 other than horizontal and vertical lines.
373 Characters above the first line (ie with a vertical position of\~0)
374 cannot be printed.
376 Color handling is different compared to
377 .BR grops (@MAN1EXT@).
378 .B \[rs]M
379 doesn't set the fill color for closed graphic objects (which
380 .B grotty
381 doesn't support anyway) but changes the background color of the character
382 cell, affecting all subsequent operations.
385 .SH "SEE ALSO"
386 .BR groff (@MAN1EXT@),
387 .BR @g@troff (@MAN1EXT@),
388 .BR groff_out (@MAN5EXT@),
389 .BR groff_font (@MAN5EXT@),
390 .BR groff_char (@MAN7EXT@),
391 .BR ul (1),
392 .BR more (1),
393 .BR man (1),
394 .BR less (1)
396 .\" Local Variables:
397 .\" mode: nroff
398 .\" End: