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