grotty.man revision 105083
1.ig
2$FreeBSD: head/contrib/groff/src/devices/grotty/grotty.man 105083 2002-10-14 09:15:17Z ru $
3Copyright (C) 1989-2000, 2001, 2002 Free Software Foundation, Inc.
4
5Permission is granted to make and distribute verbatim copies of
6this manual provided the copyright notice and this permission notice
7are preserved on all copies.
8
9Permission is granted to copy and distribute modified versions of this
10manual under the conditions for verbatim copying, provided that the
11entire resulting derived work is distributed under the terms of a
12permission notice identical to this one.
13
14Permission is granted to copy and distribute translations of this
15manual into another language, under the above conditions for modified
16versions, except that this permission notice may be included in
17translations approved by the Free Software Foundation instead of in
18the original English.
19..
20.
21.
22.TH GROTTY @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
23.SH NAME
24grotty \- groff driver for typewriter-like devices
25.
26.
27.SH SYNOPSIS
28.B grotty
29[
30.B \-bBcdfhioruUv
31] [
32.BI \-F dir
33] [
34.IR files \|.\|.\|.\&
35]
36.PP
37It is possible to have whitespace between the
38.B \-F
39option and its parameter.
40.
41.
42.SH DESCRIPTION
43.B grotty
44translates the output of GNU
45.B troff
46into a form suitable for typewriter-like devices.
47Normally
48.B grotty
49should be invoked by using the
50.B groff
51command
52with a
53.BR \-Tascii ,
54.BR \-Tkoi8-r ,
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 koi8-r ,
241.BR latin1 ,
242.BR utf8 ,
243or
244.BR cp1047 .
245.TP
246.B \-h
247Use horizontal tabs in the output.
248Tabs are assumed to be set every 8 columns.
249.
250.TP
251.B \-i
252Use escape sequences to set the italic text attribute instead of the
253underline attribute for italic fonts (`I' and `BI').
254Note that most terminals (including xterm) don't support this.
255Ignored if
256.B \-c
257is active.
258.
259.TP
260.B \-o
261Suppress overstriking (other than for bold or underlined characters in
262case the old output format has been activated with
263.BR \-c ).
264.
265.TP
266.B \-r
267Use escape sequences to set the reverse text attribute instead of the
268underline attribute for italic fonts (`I' and `BI').
269Ignored if
270.B \-c
271is active.
272.
273.TP
274.B \-u
275Suppress the use of underlining for italic characters.
276Ignored if
277.B \-c
278isn't used.
279.
280.TP
281.B \-U
282Use only underlining for bold-italic characters.
283Ignored if
284.B \-c
285isn't used.
286.
287.TP
288.B \-v
289Print the version number.
290.
291.
292.SH USAGE
293.B grotty
294understands a single X command produced using the
295.B \[rs]X
296escape sequence.
297.TP
298.BI \[rs]X'tty:\ sgr\  n '
299If
300.I n
301is non-zero or missing, enable SGR output (this is the default), otherwise
302use the old drawing scheme for bold and underline.
303.
304.
305.SH ENVIRONMENT
306.TP
307.B GROFF_NO_SGR
308If set, the old drawing scheme for bold and underline (using the
309backspace character) is active.
310Colors are disabled.
311.
312.
313.SH FILES
314.TP
315.B @FONTDIR@/devascii/DESC
316Device description file for
317.B ascii
318device.
319.
320.TP
321.BI @FONTDIR@/devascii/ F
322Font description file for font
323.I F
324of
325.B ascii
326device.
327.TP
328.B @FONTDIR@/devkoi8-r/DESC
329Device description file for
330.B koi8-r
331device.
332.TP
333.BI @FONTDIR@/devkoi8-r/ F
334Font description file for font
335.I F
336of
337.B koi8-r
338device.
339.
340.TP
341.B @FONTDIR@/devlatin1/DESC
342Device description file for
343.B latin1
344device.
345.
346.TP
347.BI @FONTDIR@/devlatin1/ F
348Font description file for font
349.I F
350of
351.B latin1
352device.
353.
354.TP
355.B @FONTDIR@/devutf8/DESC
356Device description file for
357.B utf8
358device.
359.
360.TP
361.BI @FONTDIR@/devutf8/ F
362Font description file for font
363.I F
364of
365.B utf8
366device.
367.
368.TP
369.B @FONTDIR@/devcp1047/DESC
370Device description file for
371.B cp1047
372device.
373.
374.TP
375.BI @FONTDIR@/devcp1047/ F
376Font description file for font
377.I F
378of
379.B cp1047
380device.
381.
382.TP
383.B @MACRODIR@/tty.tmac
384Macros for use with
385.BR grotty .
386.
387.TP
388.B @MACRODIR@/tty-char.tmac
389Additional klugdey character definitions for use with
390.BR grotty .
391.LP
392Note that on EBCDIC hosts, only files for the
393.B cp1047
394device will be installed.
395.
396.
397.SH BUGS
398.LP
399.B grotty
400is intended only for simple documents.
401.LP
402There is no support for fractional horizontal or vertical motions.
403.LP
404There is no support for
405.B \[rs]D
406commands
407other than horizontal and vertical lines.
408.LP
409Characters above the first line (ie with a vertical position of\~0)
410cannot be printed.
411.LP
412Color handling is different compared to
413.BR grops (@MAN1EXT@).
414.B \[rs]M
415doesn't set the fill color for closed graphic objects (which
416.B grotty
417doesn't support anyway) but changes the background color of the character
418cell, affecting all subsequent operations.
419.
420.
421.SH "SEE ALSO"
422.BR groff (@MAN1EXT@),
423.BR @g@troff (@MAN1EXT@),
424.BR groff_out (@MAN5EXT@),
425.BR groff_font (@MAN5EXT@),
426.BR groff_char (@MAN7EXT@),
427.BR ul (1),
428.BR more (1),
429.BR man (1),
430.BR less (1)
431.
432.\" Local Variables:
433.\" mode: nroff
434.\" End:
435