|
|
1.1 root 1: .TH EQN 1
2: .CT 1 writing_troff
3: .EQ
4: delim $$
5: .EN
6: .SH NAME
7: eqn, neqn, checkeq \- typeset mathematics
8: .SH SYNOPSIS
9: .B eqn
10: [
11: .I option ...
12: ]
13: [
14: .I file ...
15: ]
16: .PP
17: .B neqn
18: [
19: .I option ...
20: ]
21: [
22: .I file ...
23: ]
24: .PP
25: .B checkeq
26: [
27: .I file ...
28: ]
29: .SH DESCRIPTION
30: .I Eqn
31: is a
32: .IR troff (1)
33: preprocessor
34: for typesetting mathematics
35: on a phototypesetter,
36: .I neqn
37: on terminals.
38: Usage is almost always
39: .IP
40: .L
41: eqn file ... | troff
42: .br
43: .L
44: neqn file ... | nroff
45: .PP
46: If no files are specified,
47: these programs
48: read from the standard input.
49: .I Eqn
50: prepares output for the typesetter
51: named in the
52: .BI -T dest
53: option (Mergenthaler Linotron 202 default, see
54: .IR troff (1)).
55: When run with other preprocessor filters,
56: .I eqn
57: usually comes last.
58: .PP
59: A line beginning with
60: .B .EQ
61: marks the start of an equation;
62: the end of an equation
63: is marked by a line beginning with
64: .BR .EN .
65: Neither of these lines is altered,
66: so they may be defined in macro packages
67: to get
68: centering, numbering, etc.
69: It is also possible to set two characters
70: as `delimiters';
71: text between delimiters is also
72: .I eqn
73: input.
74: Delimiters may be set to characters
75: .I x
76: and
77: .I y
78: with the option
79: .BI -d xy
80: or (more commonly) with
81: .B delim
82: .I xy
83: between
84: .B .EQ
85: and
86: .BR .EN .
87: Left and right delimiters may be identical.
88: (They are customarily taken to be
89: $font CW "$$" )$.
90: Delimiters are turned off by
91: .LR "delim off" .
92: All text that is neither between delimiters nor between
93: .B .EQ
94: and
95: .B .EN
96: is passed through untouched.
97: .PP
98: .I Checkeq
99: reports missing or unbalanced delimiters and
100: .BR .EQ / .EN
101: pairs.
102: .PP
103: Tokens within
104: .I eqn
105: are separated by
106: spaces, tabs, newlines, braces, double quotes,
107: tildes or circumflexes.
108: Braces {} are used for grouping;
109: generally speaking,
110: anywhere a single character like
111: .L x
112: could appear, a complicated construction
113: enclosed in braces may be used instead.
114: Tilde
115: .L ~
116: represents a full space in the output,
117: circumflex
118: .L ^
119: half as much.
120: .PP
121: .vs 13p
122: Subscripts and superscripts are produced with the keywords
123: .B sub
124: and
125: .B sup.
126: Thus
127: .L "x sub i"
128: makes
129: $x sub i$,
130: .L "a sub i sup 2"
131: produces
132: $a sub i sup 2$,
133: and
134: .L "e sup {x sup 2 + y sup 2}"
135: gives
136: $e sup {x sup 2 + y sup 2}$.
137: .PP
138: Fractions are made with
139: .BR over :
140: .L "a over b"
141: yields $a over b$.
142: .PP
143: .B sqrt
144: makes square roots:
145: .L "1 over sqrt {ax sup 2 +bx+c}"
146: results in
147: $1 over sqrt {ax sup 2 +bx+c}$ .
148: .PP
149: The keywords
150: .B from
151: and
152: .B to
153: introduce lower and upper
154: limits on arbitrary things:
155: $lim from {n -> inf} sum from 0 to n x sub i$
156: is made with
157: .L "lim from {n -> inf} sum from 0 to n x sub i".
158: .PP
159: Left and right brackets, braces, etc., of the right height are made with
160: .B left
161: and
162: .B right:
163: .L "left [ x sup 2 + y sup 2 over alpha right ] ~=~1"
164: produces
165: $left [ x sup 2 + y sup 2 over alpha right ] ~=~1$.
166: The
167: .B right
168: clause is optional.
169: Legal characters after
170: .B left
171: and
172: .B right
173: are braces, brackets, bars,
174: .B c
175: and
176: .B f
177: for ceiling and floor,
178: and
179: .B
180: ""
181: for nothing at all (useful for a right-side-only bracket).
182: .PP
183: Vertical piles of things are made with
184: .BR pile ,
185: .BR lpile ,
186: .BR cpile ,
187: and
188: .BR rpile :
189: .L "pile {a above b above c}"
190: produces
191: $pile {a above b above c}$.
192: There can be an arbitrary number of elements in a pile.
193: .B lpile
194: left-justifies,
195: .B pile
196: and
197: .B cpile
198: center, with different vertical spacing,
199: and
200: .B rpile
201: right justifies.
202: .PP
203: Matrices are made with
204: .BR matrix :
205: .L "matrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } }"
206: produces
207: $matrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } }$.
208: In addition, there is
209: .B rcol
210: for a right-justified column.
211: .PP
212: .vs 12p
213: Diacritical marks are made with
214: .BR prime ,
215: .BR dot ,
216: .BR dotdot ,
217: .BR hat ,
218: .BR tilde ,
219: .BR bar ,
220: .BR under ,
221: .BR vec ,
222: .BR dyad ,
223: and
224: .BR under :
225: .L "x sub 0 sup prime = f(t) bar + g(t) under"
226: is
227: $x sub 0 sup prime = f(t) bar + g(t) under$,
228: and
229: .L "x vec = y dyad"
230: is
231: $x vec = y dyad$.
232: .PP
233: Sizes and font can be changed with
234: .B size
235: .I n
236: or
237: .B size
238: .BI \(+- n,
239: .BR roman ,
240: .BR italic ,
241: .BR bold ,
242: and
243: .BR font
244: .I n.
245: Size and fonts can be changed globally in a document by
246: .B gsize
247: .I n
248: and
249: .B gfont
250: .IR n ,
251: or by the command-line arguments
252: .BI -s n
253: and
254: .BI -f n.
255: .PP
256: Normally subscripts and superscripts are reduced by
257: 3 point sizes from the previous size;
258: this may be changed by the command-line argument
259: .BI -p n.
260: .PP
261: Successive display arguments can be lined up.
262: Place
263: .B mark
264: before the desired lineup point in the first equation;
265: place
266: .B lineup
267: at the place that is to line up vertically in subsequent equations.
268: .PP
269: Shorthands may be defined
270: or existing keywords redefined with
271: .BI define :
272: .L define
273: .I thing
274: .L %
275: .I replacement
276: .L %
277: defines a new token called
278: .I thing
279: which will be replaced by
280: .I replacement
281: whenever it appears thereafter.
282: The
283: .L %
284: may be any character that does not occur in
285: .L replacement.
286: .PP
287: Keywords like
288: .L sum
289: .EQ
290: ( sum )
291: .EN
292: .L int
293: .EQ
294: ( int )
295: .EN
296: .L inf
297: .EQ
298: ( inf )
299: .EN
300: and shorthands like
301: .L >=
302: .EQ
303: (>=)
304: .EN
305: .L ->
306: .EQ
307: (->),
308: .EN
309: and
310: .L !=
311: .EQ
312: ( != )
313: .EN
314: are recognized.
315: Greek letters are spelled out in the desired case, as in
316: .L alpha
317: or
318: .LR GAMMA .
319: Mathematical words like
320: .LR sin ,
321: .LR cos ,
322: .L log
323: are made Roman automatically.
324: .IR Troff (1)
325: four-character escapes like
326: .L \e(lh
327: (\(lh) can be used anywhere.
328: Strings enclosed in double quotes
329: .B
330: " "
331: are passed through untouched;
332: this permits keywords to be entered as text,
333: and can be used to communicate
334: with
335: .I troff
336: when all else fails.
337: .SH "SEE ALSO"
338: .IR troff (1),
339: .IR tbl (1),
340: .IR ms (6),
341: .IR eqnchar (6),
342: .IR doctype (1)
343: .br
344: B. W. Kernighan and L. L. Cherry,
345: `Typesetting Mathematics\(emUser's Guide',
346: this manual, Volume 2
347: .br
348: J. F. Ossanna and B. W. Kernighan,
349: `NROFF/TROFF User's Manual',
350: .I ibid.
351: .SH BUGS
352: To embolden digits, parens, etc.,
353: it is necessary to quote them,
354: as in
355: .LR bold\ "12.3" .
356: .EQ
357: delim off
358: .EN
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.