Merge branch 'topic/sync-to-go-2'
[s-roff.git] / man / dev-tty.1.in
blobcfbd91ac81f83a434f9b806b466ca8c3cbd7571a
1 .ig
2 @ @L_D_TTY@.1
4 Copyright (c) 2014 - 2017 Steffen (Daode) Nurpmeso <steffen@sdaoden.eu>.
6 Copyright (C) 1989 - 2006
7   Free Software Foundation, Inc.
9 Permission is granted to make and distribute verbatim copies of
10 this manual provided the copyright notice and this permission notice
11 are preserved on all copies.
13 Permission is granted to copy and distribute modified versions of this
14 manual under the conditions for verbatim copying, provided that the
15 entire resulting derived work is distributed under the terms of a
16 permission notice identical to this one.
18 Permission is granted to copy and distribute translations of this
19 manual into another language, under the above conditions for modified
20 versions, except that this permission notice may be included in
21 translations approved by the Free Software Foundation instead of in
22 the original English.
25 .do nr tty_C \n[.C]
26 .cp 0
28 .TH @U_D_TTY@ @MAN1EXT@ "@MDATE@" "@T_ROFF@ v@VERSION@"
30 .SH NAME
31 @L_D_TTY@ \- @T_ROFF@ driver for typewriter-like devices
34 .SH SYNOPSIS
35 .B @L_D_TTY@
37 .B \-bBcdfhioruUv
38 ] [
39 .BI \-F dir
40 ] [
41 .IR files \|.\|.\|.\&
43 .PP
44 It is possible to have whitespace between the
45 .B \-F
46 option and its parameter.
49 .SH DESCRIPTION
51 .B @L_D_TTY@
52 translates the output of
53 .B @L_TROFF@
54 into a form suitable for typewriter-like devices.
55 Normally
56 .B @L_D_TTY@
57 should be invoked by using the
58 .B @L_ROFF@
59 command
60 with a
61 .BR \-Tascii ,
62 .B \-Tlatin1
64 .B \-Tutf8
65 option on ASCII based systems, and with
66 .B \-Tcp1047
67 and
68 .B \-Tutf8
69 on EBCDIC based hosts.
70 If no files are given,
71 .B @L_D_TTY@
72 reads the standard input.
73 A filename of
74 .B \-
75 also causes usage of standard input.
76 Output is written to the standard output.
78 .LP
79 By default SGR escape sequences (from ISO 6429, also called ANSI color
80 escapes) are emitted to change text attributes (bold, italic, colors).
81 This makes it possible to have eight different background and
82 foreground colors; additionally, bold and italic
83 attributes can be used \f[BI]at the same time\f[] (by using the BI font).
85 .LP
86 The following colors are defined in
87 .BR tty.tmac :
88 black, white, red, green, blue, yellow, magenta, cyan.
89 Unknown colors are mapped to the default color (which is dependent on the
90 settings of the terminal; in most cases, this is black for the foreground
91 and white for the background).
93 .LP
94 Use the
95 .B \-c
96 switch to revert to the old behaviour, printing a bold character
97 .I c
98 with the sequence
99 .RI ` c
100 .SM BACKSPACE
101 .IR c '
102 and an italic character
103 .I c
104 by the sequence
105 .RB ` _
106 .SM BACKSPACE
107 .IR c '.
108 At the same time, color output is disabled.
109 The same effect can be achieved by setting either the
110 .B @U_ROFF_NO_SGR@
111 environment variable or using the `sgr' X command (see below).
114 For SGR support, it is necessary to use the
115 .B \-R
116 option of
117 .BR less (1)
118 to disable the interpretation of the old output format.
119 Consequently, all programs which use
120 .B less
121 as the pager program have to pass this option to it.
124 The old output format can be displayed on a terminal
125 by piping through
126 .BR ul (1).
127 Pagers such as
128 .BR more (1)
130 .BR less (1)
131 are also able to display these sequences.
132 Use either
133 .B \-B
135 .B \-U
136 when piping into
137 .BR less (1);
139 .B \-b
140 when piping into
141 .BR more (1).
142 There is no need to filter the output through
143 .BR col (1)
144 since
145 .B @L_D_TTY@
146 never outputs reverse line feeds.
149 The font description file may contain a command
152 .BI internalname\  n
155 where
156 .I n
157 is a decimal integer.
158 If the 01 bit in
159 .I n
160 is set,
161 then the font is treated as an italic font;
162 if the 02 bit is set,
163 then it is treated as a bold font.
164 The code field in the font description field gives the
165 code which is used to output the character.
166 This code can also be used in the
167 .B \[rs]N
168 escape sequence in
169 .BR troff .
172 .SH OPTIONS
175 .B \-b
176 Suppress the use of overstriking for bold characters.
177 Ignored if
178 .B \-c
179 isn't used.
182 .B \-B
183 Use only overstriking for bold-italic characters.
184 Ignored if
185 .B \-c
186 isn't used.
189 .B \-c
190 Use the old output format (see above).
191 This also disables color output.
194 .B \-d
195 Ignore all
196 .B \[rs]D
197 commands.
198 Without this
199 .B \[rs]D'l\|.\|.\|.\&'
200 commands that have at least one zero argument
201 (and so are either horizontal or vertical)
202 are rendered using
203 .BR \- ,
204 .BR | ,
206 .B +
207 characters.
208 In a similar way
209 .B \[rs]D'p\|.\|.\|.\&'
210 commands are handled which consist entirely of horizontal and vertical
211 lines.
215 .B \-f
216 Use form feeds in the output.
217 A form feed is output at the end of each page that has no output
218 on its last line.
221 .BI \-F dir
222 Prepend directory
223 .IB dir /dev name
224 to the search path for font and device description files;
225 .I name
226 is the name of the device, usually
227 .BR ascii ,
228 .BR latin1 ,
229 .BR utf8 ,
231 .BR cp1047 .
234 .B \-h
235 Use horizontal tabs in the output.
236 Tabs are assumed to be set every 8 columns.
239 .B \-i
240 Use escape sequences to set the italic text attribute instead of the
241 underline attribute for italic fonts (`I' and `BI').
242 Note that most terminals (including xterm) don't support this.
243 Ignored if
244 .B \-c
245 is active.
248 .B \-o
249 Suppress overstriking (other than for bold or underlined characters in
250 case the old output format has been activated with
251 .BR \-c ).
254 .B \-r
255 Use escape sequences to set the reverse text attribute instead of the
256 underline attribute for italic fonts (`I' and `BI').
257 Ignored if
258 .B \-c
259 is active.
262 .B \-u
263 Suppress the use of underlining for italic characters.
264 Ignored if
265 .B \-c
266 isn't used.
269 .B \-U
270 Use only underlining for bold-italic characters.
271 Ignored if
272 .B \-c
273 isn't used.
276 .B \-v
277 Print the version number.
280 .SH USAGE
282 .B @L_D_TTY@
283 understands a single X command produced using the
284 .B \[rs]X
285 escape sequence.
288 .BI \[rs]X'tty:\ sgr\  n '
290 .I n
291 is non-zero or missing, enable SGR output (this is the default), otherwise
292 use the old drawing scheme for bold and underline.
295 .SH ENVIRONMENT
299 .B @U_ROFF_NO_SGR@
300 If set, the old drawing scheme for bold and underline (using the
301 backspace character) is active.
302 Colors are disabled.
307 .B @U_ROFF_FONT_PATH@
308 A list of directories in which to search for the
309 .BI dev name
310 directory in addition to the default ones.
313 .BR @L_TROFF@ (@MAN1EXT@)
315 .BR \%@L_ROFF@-font (@MAN5EXT@)
316 for more details.
319 .SH FILES
322 .B @FONTDIR@/ascii/DESC
323 Device description file for
324 .B ascii
325 device.
328 .BI @FONTDIR@/ascii/ F
329 Font description file for font
330 .I F
332 .B ascii
333 device.
336 .B @FONTDIR@/latin1/DESC
337 Device description file for
338 .B latin1
339 device.
342 .BI @FONTDIR@/latin1/ F
343 Font description file for font
344 .I F
346 .B latin1
347 device.
350 .B @FONTDIR@/utf8/DESC
351 Device description file for
352 .B utf8
353 device.
356 .BI @FONTDIR@/utf8/ F
357 Font description file for font
358 .I F
360 .B utf8
361 device.
364 .B @FONTDIR@/cp1047/DESC
365 Device description file for
366 .B cp1047
367 device.
370 .BI @FONTDIR@/cp1047/ F
371 Font description file for font
372 .I F
374 .B cp1047
375 device.
378 .B @MACRODIR@/tty.tmac
379 Macros for use with
380 .BR @L_D_TTY@ .
383 .B @MACRODIR@/tty-char.tmac
384 Additional klugdey character definitions.
387 Note that on EBCDIC hosts, only files for the
388 .B cp1047
389 device are installed.
392 .SH BUGS
395 .B @L_D_TTY@
396 is intended only for simple documents.
399 There is no support for fractional horizontal or vertical motions.
402 There is no support for
403 .B \[rs]D
404 commands
405 other than horizontal and vertical lines.
408 Characters above the first line (ie with a vertical position of\~0)
409 cannot be printed.
412 Color handling is different compared to
413 .BR @L_D_PS@ (@MAN1EXT@).
414 .B \[rs]M
415 doesn't set the fill color for closed graphic objects (which
416 .B @L_D_TTY@
417 doesn't support anyway) but changes the background color of the character
418 cell, affecting all subsequent operations.
421 .SH "SEE ALSO"
423 .BR @L_ROFF@ (@MAN1EXT@),
424 .BR @L_TROFF@ (@MAN1EXT@),
425 .BR @L_ROFF@-out (@MAN5EXT@),
426 .BR @L_ROFF@-font (@MAN5EXT@),
427 .BR @L_ROFF@-char (@MAN7EXT@),
428 .BR ul (1),
429 .BR more (1),
430 .BR man (1),
431 .BR less (1)
433 .cp \n[tty_C]
435 .\" s-ts-mode