EQN(I) − PWB/UNIX 2/22/74
NAME
eqn − typeset mathematics
SYNOPSIS
eqn [ file ] ...
DESCRIPTION
Eqn is a troff (I) preprocessor for typesetting mathematics on the Graphics Systems phototypesetter. Usage is almost always eqn file ... | troff If no files are specified, eqn reads from the standard input. A line beginning with “.EQ” marks the start of an equation; the end of an equation is marked by a line beginning with “.EN”. Neither of these lines is altered or defined by eqn, so you can define them yourself to get centering, numbering, etc. All other lines are treated as comments, and passed through untouched. Spaces, tabs, newlines, braces, double quotes, tilde and circumflex are the only delimiters. Braces “{}” are used for grouping. Use tildes “~” to get extra spaces in an equation. Subscripts and superscripts are produced with the keywords sub and sup. Thus "x sub i" makes xi, "a sub i sup 2" produces ai2, and "e sup {x sup 2 + y sup 2}" gives ex2+y2. Fractions are made with over. "a over b" isa over b and "1 over sqrt {ax sup 2 +bx+c}" is 1 over √ax2+bx+c . sqrt makes square roots. The keywords from and to introduce lower and upper limits on arbitrary things: limn→∞n∑0xi is made with "lim from {n-> inf} sum from 0 to n x sub i." Left and right brackets, braces, etc., of the right height are made with left and right: "left [ x sup 2 + y sup 2 over alpha right ] ~=~1" produces
⎡
⎢
⎣x2+y2 over α
⎤
⎥
⎦ = 1. The right clause is optional. Vertical piles of things are made with "pile, lpile, cpile," and rpile: "pile {a above b above c}" produces a
b
c. There can be an arbitrary number of elements in a pile. lpile left-justifies, pile and cpile center, with different vertical spacing, and rpile right justifies. Diacritical marks are made with dot, dotdot, hat, bar: "x dot = f(t) bar" is ẋ=f(t). Default sizes and fonts can be changed with "size n" and various of roman, italic, and bold. Keywords like sum (∑)int (∫)inf (∞)and shorthands like >= (≥)−> (→),!= (≠),are recognized. Spell out Greek letters in the desired case, as in "alpha, GAMMA." Mathematical words like sin, cos, log are made Roman automatically. Troff (I) four-character escapes like \(bs () can be used anywhere. Strings enclosed in double quotes "..." are passed through untouched.
SEE ALSO
A System for Typesetting Mathematics (Computer Science Technical Report #17, Bell Laboratories, 1974.)
TROFF Users’ Manual (internal memorandum)
TROFF Made Trivial (internal memorandum)
troff (I), neqn (I)
BUGS
Undoubtedly. Watch out for small or large point sizes − it’s tuned too well for size 10. Be cautious if inserting horizontal or vertical motions, and of backslashes in general.