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