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