6 dfc67f9b 2004-05-16 devnull eqn \- typeset mathematics
7 dfc67f9b 2004-05-16 devnull .SH SYNOPSIS
10 dfc67f9b 2004-05-16 devnull .I option ...
13 dfc67f9b 2004-05-16 devnull .I file ...
15 dfc67f9b 2004-05-16 devnull .SH DESCRIPTION
18 dfc67f9b 2004-05-16 devnull .IR troff (1)
19 dfc67f9b 2004-05-16 devnull preprocessor
20 dfc67f9b 2004-05-16 devnull for typesetting mathematics
21 dfc67f9b 2004-05-16 devnull on a typesetter.
22 dfc67f9b 2004-05-16 devnull Usage is almost always
25 dfc67f9b 2004-05-16 devnull eqn file ... | troff
27 dfc67f9b 2004-05-16 devnull If no files are specified,
29 dfc67f9b 2004-05-16 devnull reads from the standard input.
31 dfc67f9b 2004-05-16 devnull prepares output for the typesetter
32 dfc67f9b 2004-05-16 devnull named in the
33 dfc67f9b 2004-05-16 devnull .BI -T dest
34 dfc67f9b 2004-05-16 devnull option (default
35 dfc67f9b 2004-05-16 devnull .BR -Tutf ;
37 dfc67f9b 2004-05-16 devnull .IR troff (1)).
38 dfc67f9b 2004-05-16 devnull When run with other preprocessor filters,
40 dfc67f9b 2004-05-16 devnull usually comes last.
42 dfc67f9b 2004-05-16 devnull A line beginning with
44 dfc67f9b 2004-05-16 devnull marks the start of an equation;
45 dfc67f9b 2004-05-16 devnull the end of an equation
46 dfc67f9b 2004-05-16 devnull is marked by a line beginning with
47 dfc67f9b 2004-05-16 devnull .BR .EN .
48 dfc67f9b 2004-05-16 devnull Neither of these lines is altered,
49 dfc67f9b 2004-05-16 devnull so they may be defined in macro packages
51 dfc67f9b 2004-05-16 devnull centering, numbering, etc.
52 dfc67f9b 2004-05-16 devnull It is also possible to set two characters
53 dfc67f9b 2004-05-16 devnull as `delimiters';
54 dfc67f9b 2004-05-16 devnull text between delimiters is also
57 dfc67f9b 2004-05-16 devnull Delimiters may be set to characters
61 dfc67f9b 2004-05-16 devnull with the option
62 dfc67f9b 2004-05-16 devnull .BI -d xy
63 dfc67f9b 2004-05-16 devnull or (more commonly) with
69 dfc67f9b 2004-05-16 devnull .BR .EN .
70 dfc67f9b 2004-05-16 devnull Left and right delimiters may be identical.
71 dfc67f9b 2004-05-16 devnull (They are customarily taken to be
72 dfc67f9b 2004-05-16 devnull $font L "$$" )$.
73 dfc67f9b 2004-05-16 devnull Delimiters are turned off by
74 dfc67f9b 2004-05-16 devnull .LR "delim off" .
75 dfc67f9b 2004-05-16 devnull All text that is neither between delimiters nor between
79 dfc67f9b 2004-05-16 devnull is passed through untouched.
81 dfc67f9b 2004-05-16 devnull Tokens within
83 dfc67f9b 2004-05-16 devnull are separated by
84 dfc67f9b 2004-05-16 devnull spaces, tabs, newlines, braces, double quotes,
85 dfc67f9b 2004-05-16 devnull tildes or circumflexes.
86 dfc67f9b 2004-05-16 devnull Braces {} are used for grouping;
87 dfc67f9b 2004-05-16 devnull generally speaking,
88 dfc67f9b 2004-05-16 devnull anywhere a single character like
90 dfc67f9b 2004-05-16 devnull could appear, a complicated construction
91 dfc67f9b 2004-05-16 devnull enclosed in braces may be used instead.
94 dfc67f9b 2004-05-16 devnull represents a full space in the output,
95 dfc67f9b 2004-05-16 devnull circumflex
97 dfc67f9b 2004-05-16 devnull half as much.
100 dfc67f9b 2004-05-16 devnull Subscripts and superscripts are produced with the keywords
103 dfc67f9b 2004-05-16 devnull .BR sup .
105 dfc67f9b 2004-05-16 devnull .L "x sub i"
107 dfc67f9b 2004-05-16 devnull $x sub i$,
108 dfc67f9b 2004-05-16 devnull .L "a sub i sup 2"
109 dfc67f9b 2004-05-16 devnull produces
110 dfc67f9b 2004-05-16 devnull $a sub i sup 2$,
112 dfc67f9b 2004-05-16 devnull .L "e sup {x sup 2 + y sup 2}"
114 dfc67f9b 2004-05-16 devnull $e sup {x sup 2 + y sup 2}$.
117 dfc67f9b 2004-05-16 devnull makes fractions:
118 dfc67f9b 2004-05-16 devnull .L "a over b"
119 dfc67f9b 2004-05-16 devnull yields $a over b$.
122 dfc67f9b 2004-05-16 devnull produces square roots:
123 dfc67f9b 2004-05-16 devnull .L "1 over sqrt {ax sup 2 +bx+c}"
124 dfc67f9b 2004-05-16 devnull results in
125 dfc67f9b 2004-05-16 devnull $1 over sqrt {ax sup 2 +bx+c}$ .
127 dfc67f9b 2004-05-16 devnull The keywords
131 dfc67f9b 2004-05-16 devnull introduce lower and upper
132 dfc67f9b 2004-05-16 devnull limits on arbitrary things:
133 dfc67f9b 2004-05-16 devnull $lim from {n -> inf} sum from 0 to n x sub i$
134 dfc67f9b 2004-05-16 devnull is made with
135 dfc67f9b 2004-05-16 devnull .LR "lim from {n -> inf} sum from 0 to n x sub i" .
137 dfc67f9b 2004-05-16 devnull Left and right brackets, braces, etc., of the right height are made with
140 dfc67f9b 2004-05-16 devnull .BR right :
141 dfc67f9b 2004-05-16 devnull .L "left [ x sup 2 + y sup 2 over alpha right ] ~=~1"
142 dfc67f9b 2004-05-16 devnull produces
143 dfc67f9b 2004-05-16 devnull $left [ x sup 2 + y sup 2 over alpha right ] ~=~1$.
145 dfc67f9b 2004-05-16 devnull .B right
146 dfc67f9b 2004-05-16 devnull clause is optional.
147 dfc67f9b 2004-05-16 devnull Legal characters after
150 dfc67f9b 2004-05-16 devnull .B right
151 dfc67f9b 2004-05-16 devnull are braces, brackets, bars,
155 dfc67f9b 2004-05-16 devnull for ceiling and floor,
159 dfc67f9b 2004-05-16 devnull for nothing at all (useful for a right-side-only bracket).
161 dfc67f9b 2004-05-16 devnull Vertical piles of things are made with
162 dfc67f9b 2004-05-16 devnull .BR pile ,
163 dfc67f9b 2004-05-16 devnull .BR lpile ,
164 dfc67f9b 2004-05-16 devnull .BR cpile ,
166 dfc67f9b 2004-05-16 devnull .BR rpile :
167 dfc67f9b 2004-05-16 devnull .L "pile {a above b above c}"
168 dfc67f9b 2004-05-16 devnull produces
169 dfc67f9b 2004-05-16 devnull $pile {a above b above c}$.
170 dfc67f9b 2004-05-16 devnull There can be an arbitrary number of elements in a pile.
171 dfc67f9b 2004-05-16 devnull .B lpile
172 dfc67f9b 2004-05-16 devnull left-justifies,
175 dfc67f9b 2004-05-16 devnull .B cpile
176 dfc67f9b 2004-05-16 devnull center, with different vertical spacing,
178 dfc67f9b 2004-05-16 devnull .B rpile
179 dfc67f9b 2004-05-16 devnull right justifies.
181 dfc67f9b 2004-05-16 devnull Matrices are made with
182 dfc67f9b 2004-05-16 devnull .BR matrix :
183 dfc67f9b 2004-05-16 devnull .L "matrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } }"
184 dfc67f9b 2004-05-16 devnull produces
185 dfc67f9b 2004-05-16 devnull $matrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } }$.
186 dfc67f9b 2004-05-16 devnull In addition, there is
188 dfc67f9b 2004-05-16 devnull for a right-justified column.
191 dfc67f9b 2004-05-16 devnull Diacritical marks are made with
192 dfc67f9b 2004-05-16 devnull .BR prime ,
193 dfc67f9b 2004-05-16 devnull .BR dot ,
194 dfc67f9b 2004-05-16 devnull .BR dotdot ,
195 dfc67f9b 2004-05-16 devnull .BR hat ,
196 dfc67f9b 2004-05-16 devnull .BR tilde ,
197 dfc67f9b 2004-05-16 devnull .BR bar ,
198 dfc67f9b 2004-05-16 devnull .BR under ,
199 dfc67f9b 2004-05-16 devnull .BR vec ,
200 dfc67f9b 2004-05-16 devnull .BR dyad ,
202 dfc67f9b 2004-05-16 devnull .BR under :
203 dfc67f9b 2004-05-16 devnull .L "x sub 0 sup prime = f(t) bar + g(t) under"
205 dfc67f9b 2004-05-16 devnull $x sub 0 sup prime = f(t) bar + g(t) under$,
207 dfc67f9b 2004-05-16 devnull .L "x vec = y dyad"
209 dfc67f9b 2004-05-16 devnull $x vec = y dyad$.
211 dfc67f9b 2004-05-16 devnull Sizes and fonts can be changed with prefix operators
215 dfc67f9b 2004-05-16 devnull .BI ± n \f1,
216 dfc67f9b 2004-05-16 devnull .BR fat ,
217 dfc67f9b 2004-05-16 devnull .BR roman ,
218 dfc67f9b 2004-05-16 devnull .BR italic ,
219 dfc67f9b 2004-05-16 devnull .BR bold ,
221 dfc67f9b 2004-05-16 devnull .BR font
223 dfc67f9b 2004-05-16 devnull Size and fonts can be changed globally in a document by
224 dfc67f9b 2004-05-16 devnull .B gsize
227 dfc67f9b 2004-05-16 devnull .B gfont
229 dfc67f9b 2004-05-16 devnull or by the command-line arguments
230 dfc67f9b 2004-05-16 devnull .BI -s n
232 dfc67f9b 2004-05-16 devnull .BI -f n\f1.
234 dfc67f9b 2004-05-16 devnull Normally subscripts and superscripts are reduced by
235 dfc67f9b 2004-05-16 devnull 3 point sizes from the previous size;
236 dfc67f9b 2004-05-16 devnull this may be changed by the command-line argument
237 dfc67f9b 2004-05-16 devnull .BI -p n\f1.
239 dfc67f9b 2004-05-16 devnull Successive display arguments can be lined up.
242 dfc67f9b 2004-05-16 devnull before the desired lineup point in the first equation;
244 dfc67f9b 2004-05-16 devnull .B lineup
245 dfc67f9b 2004-05-16 devnull at the place that is to line up vertically in subsequent equations.
247 dfc67f9b 2004-05-16 devnull Shorthands may be defined
248 dfc67f9b 2004-05-16 devnull or existing keywords redefined with
249 dfc67f9b 2004-05-16 devnull .BR define :
250 dfc67f9b 2004-05-16 devnull .L define
251 dfc67f9b 2004-05-16 devnull .I thing
253 dfc67f9b 2004-05-16 devnull .I replacement
255 dfc67f9b 2004-05-16 devnull defines a new token called
256 dfc67f9b 2004-05-16 devnull .I thing
257 dfc67f9b 2004-05-16 devnull which will be replaced by
258 dfc67f9b 2004-05-16 devnull .I replacement
259 dfc67f9b 2004-05-16 devnull whenever it appears thereafter.
262 dfc67f9b 2004-05-16 devnull may be any character that does not occur in
263 dfc67f9b 2004-05-16 devnull .LR replacement .
265 dfc67f9b 2004-05-16 devnull Keywords like
268 dfc67f9b 2004-05-16 devnull ( sum ),
272 dfc67f9b 2004-05-16 devnull ( int ),
276 dfc67f9b 2004-05-16 devnull ( inf ),
278 dfc67f9b 2004-05-16 devnull and shorthands like
292 dfc67f9b 2004-05-16 devnull are recognized.
293 dfc67f9b 2004-05-16 devnull Greek letters are spelled out in the desired case, as in
294 dfc67f9b 2004-05-16 devnull .L alpha
296 dfc67f9b 2004-05-16 devnull .LR GAMMA .
297 dfc67f9b 2004-05-16 devnull Mathematical words like
298 dfc67f9b 2004-05-16 devnull .LR sin ,
299 dfc67f9b 2004-05-16 devnull .LR cos ,
301 dfc67f9b 2004-05-16 devnull are made Roman automatically.
302 dfc67f9b 2004-05-16 devnull .IR Troff (1)
303 dfc67f9b 2004-05-16 devnull four-character escapes like
304 dfc67f9b 2004-05-16 devnull .L \e(lh
305 dfc67f9b 2004-05-16 devnull (\(lh) can be used anywhere.
306 dfc67f9b 2004-05-16 devnull Strings enclosed in double quotes " "
307 dfc67f9b 2004-05-16 devnull are passed through untouched;
308 dfc67f9b 2004-05-16 devnull this permits keywords to be entered as text,
309 dfc67f9b 2004-05-16 devnull and can be used to communicate
311 dfc67f9b 2004-05-16 devnull .I troff
312 dfc67f9b 2004-05-16 devnull when all else fails.
313 dfc67f9b 2004-05-16 devnull .SH FILES
314 dfc67f9b 2004-05-16 devnull .TF /sys/lib/troff/font/devutf
316 dfc67f9b 2004-05-16 devnull .B /sys/lib/troff/font/devutf
317 dfc67f9b 2004-05-16 devnull font descriptions for PostScript
318 dfc67f9b 2004-05-16 devnull .SH SOURCE
319 c3674de4 2005-01-11 devnull .B \*9/src/cmd/eqn
320 dfc67f9b 2004-05-16 devnull .SH "SEE ALSO"
321 dfc67f9b 2004-05-16 devnull .IR troff (1),
322 dfc67f9b 2004-05-16 devnull .IR tbl (1)
324 dfc67f9b 2004-05-16 devnull J. F. Ossanna and B. W. Kernighan,
325 dfc67f9b 2004-05-16 devnull ``Troff User's Manual''.
327 dfc67f9b 2004-05-16 devnull B. W. Kernighan and L. L. Cherry,
328 dfc67f9b 2004-05-16 devnull ``Typesetting Mathematics\(emUser's Guide'',
330 dfc67f9b 2004-05-16 devnull Unix Research System Programmer's Manual,
331 dfc67f9b 2004-05-16 devnull Tenth Edition, Volume 2.
332 dfc67f9b 2004-05-16 devnull .SH BUGS
333 dfc67f9b 2004-05-16 devnull To embolden digits, parens, etc.,
334 dfc67f9b 2004-05-16 devnull it is necessary to quote them,
336 dfc67f9b 2004-05-16 devnull .LR bold\ "12.3" .
338 dfc67f9b 2004-05-16 devnull delim off