xref: /titanic_50/usr/src/cmd/troff/nroff.d/terms.d/README (revision 5c51f1241dbbdf2656d0e10011981411ed0c9673)
1# Copyright 1989 Sun Microsystems, Inc.  All rights reserved.
2# Use is subject to license terms.
3
4# Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
5# All Rights Reserved
6
7# Portions of this source code were derived from Berkeley 4.3 BSD
8# under license from the Regents of the University of California.
9
10#ident	"%Z%%M%	%I%	%E% SMI"
11
12Description of terminal tables for new nroff:
13(In the following description, "white space" means any combination
14of spaces, tabs and new-lines).
15
16The first line should contain the name of the terminal -- just a string,
17but with no embedded white space.
18
19This is followed by a table of 25 lines (defining the first 25 items
20in struct t, laid out in tw.h):
21
22	bset	[integer]	/*bits that must be set for printing*/
23	breset	[integer]	/*bits that must be reset for printing*/
24	Hor	[integer]	/*size of unit of horizontal motion*/
25	Vert	[integer]	/*size of unit of vertical motion*/
26	Newline	[integer]	/*size of line of vertical motion*/
27	Char	[integer]	/*size of character horizontally*/
28	Em	[integer]	/*size of Em of horizontal motion*/
29	Halfline [integer]	/*size of half line of vertical motion*/
30	Adj	[integer]	/*horizontal resolution*/
31	twinit	[string]	/*sequence to initialize terminal*/
32	twrest	[string]	/*sequence to restore terminal*/
33	twnl	[string]	/*sequence to print newline*/
34	hlr	[string]	/*sequence for half-line reverse*/
35	hlf	[string]	/*sequence for half-line forward*/
36	flr	[string]	/*sequence for full-line reverse*/
37	bdon	[string]	/*sequence to turn on bold*/
38	bdoff	[string]	/*sequence to turn off bold*/
39	iton	[string]	/*sequence to turn on italic*/
40	itoff	[string]	/*sequence to turn off italic*/
41	ploton	[string]	/*sequence to enter plot mode*/
42	plotoff	[string]	/*sequence to leave plot mode*/
43	up	[string]	/*sequence to move up 1 space in plot mode*/
44	down	[string]	/*sequence to move down 1 space in plot mode*/
45	right	[string]	/*sequence to move right 1 space in plot mode*/
46	left	[string]	/*sequence to move left 1 space in plot mode*/
47
48This table is fixed format, and the order cannot be changed.
49Entries should be on separate lines, and should contain exactly
50two fields (N.B. the comment should be omitted) separated by white space.
51First field is the string identifying the value (this is not verified),
52then white space, and then the value.  The value is either an integer,
53or a string, as specified above.  An integer is a sequence of digits.
54Integers describing sizes are expressed in units of 1/240 of an inch.
55A string is a sequence of characters, probably surrounded by quotes
56(to be on the safe side).  For non-printable ascii characters, the
57following escapes hold (as in C):
58	\b	backspace
59	\t	tab
60	\n	newline
61	\r	carriage return
62	\\	\
63	\"	"
64	\ followed by 3 octal digits specifies the ascii character
65					with the value of those digits
66
67This is followed by a line containing the word "charset", and then by the table of
68special characters -- all the non-ASCII characters that nroff/troff
69knows by 2-character names, e.g. \(hy and \(ga.  The entries in this
70table can be in any order (put the most used ones first), and
71the entries should be restricted to only those characters that
72can be printed on the terminal in question.  The format of each line
73(defining one special character) is:  the (2-character) name of the
74special character, followed by white space, followed by the width of
75the character (in ems), followed by white space, followed by the
76sequence needed to produce the character.  This sequence may be
77surrounded by quotes.  The same escapes hold as for strings above.
78
79The best way to create a terminal table for a new device is to take
80a terminal table for an old device and modify it!
81For example, here is the first page of the terminal table for lp:
82
83lp
84bset	0
85breset	0
86Hor	24
87Vert	40
88Newline	40
89Char	24
90Em	24
91Halfline	20
92Adj	24
93twinit	""
94twrest	""
95twnl	"\n"
96hlr	""
97hlf	""
98flr	"\0337"
99bdon	""
100bdoff	""
101iton	""
102itoff	""
103ploton	""
104plotoff	""
105up	""
106down	""
107right	""
108left	""
109
110charset
111
112em 1 -
113hy 1 -
114\- 1 -
115bu 1 +\bo
116sq 2 []
117ru 1 _
11814 3 1/4
11912 3 1/2
12034 3 3/4
121de 1 \344o\304
122dg 1 |\b-
123fm 1 '
124ct 1 c\b/
125rg 1 r\bO
126co 1 c\bO
127pl 1 +
128mi 1 -
129eq 1 =
130** 1 *
131