* man/groff_out.man: Fix nroff mode activation (for emacs).
[s-roff.git] / man / groff_out.man
blob5e4c90684ec16d40a69d07ccb7b63b337a94281f
1 '\" e
2 .\" The above line should force the use of eqn as a preprocessor
3 .ig
4 Copyright (C) 1989-2000 Free Software Foundation, Inc.
6 Permission is granted to make and distribute verbatim copies of
7 this manual provided the copyright notice and this permission notice
8 are preserved on all copies.
10 Permission is granted to copy and distribute modified versions of this
11 manual under the conditions for verbatim copying, provided that the
12 entire resulting derived work is distributed under the terms of a
13 permission notice identical to this one.
15 Permission is granted to copy and distribute translations of this
16 manual into another language, under the above conditions for modified
17 versions, except that this permission notice may be included in
18 translations approved by the Free Software Foundation instead of in
19 the original English.
21 .\" This man page must be preprocessed with eqn.
22 .ie \n(.g .ds ic \/
23 .el .ds ic \^
24 .TH GROFF_OUT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@"
25 .SH NAME
26 groff_out \- groff intermediate output format
27 .SH DESCRIPTION
28 This manual page describes the format output by GNU troff.
29 The output format used by GNU troff is very similar to that used
30 by Unix device-independent troff. Only the differences are documented
31 here.
32 .LP
33 The argument to the
34 .B s
35 command is in scaled points (units of
36 .IR points/ n ,
37 where
38 .I n
39 is the argument to the
40 .B sizescale
41 command  in the DESC file.)
42 The argument to the
43 .B x\ Height
44 command is also in scaled points.
45 .LP
46 The first three output commands are guaranteed to be:
47 .IP
48 .BI x\ T\  device
49 .br
50 .BI x\ res\  n\ h\ v
51 .br
52 .B x init
53 .LP
54 If the
55 .B tcommand
56 line is present in the DESC file, troff will use the following
57 two commands
58 .TP
59 .BI t xxx
60 .I xxx
61 is any sequence of characters terminated by a space or a newline;
62 the first character should be printed at the current position,
63 the the current horizontal position should be increased by
64 the width of the first character, and so on for each character.
65 The width of the character is that given in the font file,
66 appropriately scaled for the current point size, and rounded
67 so that it is a multiple of the horizontal resolution.
68 Special characters cannot be printed using this command.
69 .TP
70 .BI u n\ xxx
71 This is same as the
72 .B t
73 command except that after printing each character, the current horizontal
74 position is increased by the sum of the width of that character
75 and
76 .IR n .
77 .LP
78 Note that single characters can have the eighth bit set, as can the
79 names of fonts and special characters.
80 .LP
81 The names of characters and fonts can be of arbitrary length; drivers
82 should not assume that they will be only two characters long.
83 .LP
84 When a character is to be printed, that character will always be
85 in the current font.
86 Unlike device-independent troff, it is not necessary
87 for drivers to search special fonts to find a character.
88 .LP
89 The
90 .B D
91 drawing command has been extended.
92 These extensions will not be used by GNU pic if the
93 .B \-n
94 option is given.
95 .TP
96 \fBDf \fIn\fR\*(ic\en
97 Set the shade of gray to be used for filling solid objects to
98 .IR n ;
99 .I n
100 must be an integer between 0 and 1000, where 0 corresponds solid white
101 and 1000 to solid black, and values in between correspond to
102 intermediate shades of gray.
103 This applies only to solid circles, solid ellipses and solid
104 polygons.
105 By default, a level of 1000 will be used.
106 Whatever color a solid object has, it should completely obscure
107 everything beneath it.
108 A value greater than 1000 or less than 0 can also be used:
109 this means fill with the shade of gray that is currently being used
110 for lines and text.
111 Normally this will be black, but some drivers may provide
112 a way of changing this.
114 \fBDC \fId\fR\*(ic\en
115 Draw a solid circle with a diameter of
116 .I d
117 with the leftmost point at the current position.
119 \fBDE \fIdx dy\fR\*(ic\en
120 Draw a solid ellipse with a horizontal diameter of
121 .I dx
122 and a vertical diameter of
123 .I dy
124 with the leftmost point at the current position.
126 delim $$
129 \fBDp\fR $dx sub 1$ $dy sub 1$ $dx sub 2$ $dy sub 2$ $...$ $dx sub n$ $dy sub n$\en
130 Draw a polygon with,
131 for $i = 1 ,..., n+1$, the
132 .IR i -th
133 vertex at the current position 
134 $+ sum from j=1 to i-1 ( dx sub j , dy sub j )$.
135 At the moment,
136 GNU pic only uses this command to generate triangles and rectangles.
138 \fBDP\fR $dx sub 1$ $dy sub 1$ $dx sub 2$ $dy sub 2$ $...$ $dx sub n$ $dy sub n$\en
139 Like
140 .B Dp
141 but draw a solid rather than outlined polygon.
143 \fBDt \fIn\fR\*(ic\en
144 Set the current line thickness to
145 .I n
146 machine units.
147 Traditionally Unix troff drivers use a line thickness proportional to the current
148 point size; drivers should continue to do this if no
149 .B Dt
150 command has been given, or if a
151 .B Dt
152 command has been given with a negative value of
153 .IR n .
154 A zero value of
155 .I n
156 selects the smallest available line thickness.
158 A difficulty arises in how the current position should be changed after
159 the execution of these commands.
160 This is not of great importance since the code generated by GNU pic
161 does not depend on this.
162 Given a drawing command of the form
164 \fB\eD\(fm\fIc\fR $x sub 1$ $y sub 1$ $x sub 2$ $y sub 2$ $...$ $x sub n$ $y sub n$\(fm
166 where
167 .I c
168 is not one of
169 .BR c ,
170 .BR e ,
171 .BR l ,
172 .B a
174 .BR ~ ,
175 Unix troff will treat each of the $x sub i$ as a horizontal quantity,
176 and each of the $y sub i$ as a vertical quantity and will assume that
177 the width of the drawn object is $sum from i=1 to n x sub i$,
178 and that the height is $sum from i=1 to n y sub i$.
179 (The assumption about the height can be seen by examining the
180 .B st
182 .B sb
183 registers after using such a
184 .B D
185 command in a \ew escape sequence.)
186 This rule also holds for all the original drawing commands
187 with the exception of
188 .BR De .
189 For the sake of compatibility GNU troff also follows this rule,
190 even though it produces an ugly result in the case of the
191 .BR Df ,
192 .BR Dt ,
193 and, to a lesser extent,
194 .B DE
195 commands.
196 Thus after executing a
197 .B D
198 command of the form
200 \fBD\fIc\fR $x sub 1$ $y sub 1$ $x sub 2$ $y sub 2$ $...$ $x sub n$ $y sub n$\en
202 the current position should be increased by
203 $( sum from i=1 to n x sub i , sum from i=1 to n y sub i )$.
205 There is a continuation convention which permits the argument to the
206 .B x\ X
207 command to contain newlines:
208 when outputting the argument to the
209 .B x\ X
210 command, GNU troff
211 will follow each newline in the argument with a
212 .B +
213 character
214 (as usual, it will terminate the entire argument with a newline);
215 thus if the line after the line containing the
216 .B x\ X
217 command starts with
218 .BR + ,
219 then the newline ending the line containing the
220 .B x\ X
221 command should be treated as part of the argument to the
222 .B x\ X
223 command,
225 .B +
226 should be ignored,
227 and the part of the line following the
228 .B +
229 should be treated like the part of the line following the
230 .B x\ X
231 command.
232 .SH "SEE ALSO"
233 .BR groff_font (@MAN5EXT@)
235 .\" Local Variables:
236 .\" mode: nroff
237 .\" End: