summaryrefslogtreecommitdiff
path: root/static/unix-v10/man5/troff.5
blob: 22405618b0e752a47d3b339258764c7ead410b20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
.TH TROFF 5
.CT 1 writing_output
.SH NAME
troff \- device-independent output
.SH DESCRIPTION
.IR Troff (1)
produces an ASCII representation of a typeset document,
expressed in the following syntax.
Strings inside
.B [
.B ]
are optional.
The string
.B \en
represents newline.
White space (spaces or newlines) may occur
between commands and is sometimes necessary to terminate numbers.
.PP
.TP
.BI s n
Set point size to
.I n.
.PD 0
.TP
.BI f n
Use font in position 
.I n.
Normally fonts
are mounted starting at position 1; 0 is reserved.
.I troff.
.TP
.BI c x
Place character
.I x
at the current location on the page;
.I x
is a single ASCII character.
.TP
.BI C name
Place special character.
The
.I name
of the character is delimited by white space.
.TP
.BI H n
Go to horizontal location
.I n,
expressed in basic units.
.TP
.BI h n
Add 
.I n
to the current horizontal location (relative goto).
.TP
.BI V n
Go to vertical location
.I n,
measured positive downward.
.TP
.BI v n
Add 
.I n
to the current vertical location.
.TP
.I nnx
A two-digit number followed by an ASCII character; equivalent to
.BI h nn c x.
.TP
.BI n b\ a
End of line.
No action is required;
.I troff
will explicitly reset the location.
Number
.IR b 
is the amount of space before
the line,
.IR a ,
the amount of space after the line.
.TP
.B w
A
.B w
appears between words of the input document.
No action is
required.
.TP
.BI p n
Begin a new page with page number
.I n.
The vertical location on the page becomes 0.
.TP
.BI # \ .... \en
Comment.
.TP
.BI Dl " x y" \en
Draw a line from the current location by
.IR x , y .
.TP 
.BI Dc " d" \en
Draw a circle of diameter
.I d
with the leftmost edge at the current location,
.IR x , y .
The current location becomes
.IR x + d  , y .
.TP
.BI De " dx dy" \en
Draw an ellipse with 
.IR x -axis
.I dx
and
.IR y -axis
.I dy.
The leftmost edge
of the ellipse will be at the current location.
The current location becomes
.IR x + dx , y .
.TP
.BI Da " x y u v" \en
Draw an arc counterclockwise from the current location to
.IR x + u,
.IR y + v,
with center offset
.IR x , y
from the current location.
The end of the arc becomes the current location.
.TP
.BI D~ " x y x y ..." \en
Draw a spline curve (wiggly line) from the
current location, moving by
.I x,y
each time.
The end of the curve becomes the current location.
.TP
.B x\ i[nit]\en
Initialize the typesetting device.
The actions required depend on the device.
.TP
.BI x\ T \ dest \en
The name of the typesetter is
.IR dest ,
as in  option
.BR \-T 
of
.IR troff (1).
.TP
.BI "x r[es]" " n h v" \en
The resolution of the typesetting device is
.IR n 
units per inch.
Horizontal motions must be multiples of
.I h
units, vertical motions 
.I v
units.
.TP
.B x p[ause]\en
Pause.
Cause the current page to finish but do not relinquish the
typesetter.
.TP
.B x s[top]\en
Stop.
Cause the current page to finish and then relinquish the typesetter.
.TP
.B x t[railer]\en
Generate a trailer if necessary.
.TP
.BI "x f[ont]" " n name" \en
Load font
.I name
into position
.IR n .
.TP
.BI "x H[eight] "  n \en
Set the character height to
.I n
points.
This causes the letters
to be elongated or shortened.
It does not affect the width
of a letter.
Not all typesetters can do this.
.TP
.BI "x S[lant] " n \en
Set the slant to
.I n
degrees, if possible.
.TP
.BI x "..." \en
Arbitrary;  may be used for device-specific functions.
.SH SEE ALSO
.IR troff (1),
.IR d202 (1),
.IR apsend (1),
.IR lp (1),
.IR proof (9.1)
.br
B. W. Kernighan,
.I "A Typesetter-Independent Troff
this manual, volume 2.