1EQN(1)                      General Commands Manual                     EQN(1)
2
3
4
5delim $$
6

NAME

8       eqn, neqn, checkeq  -  typeset mathematics
9

SYNOPSIS

11       eqn [ -dxy ] [ -pn ] [ -sn ] [ -fn ] [ file ] ...
12       checkeq [ file ] ...
13

DESCRIPTION

15       Eqn is a troff(1) preprocessor for typesetting mathematics on a Graphic
16       Systems phototypesetter, neqn on terminals.  Usage is almost always
17
18            eqn file ... | troff
19            neqn file ... | nroff
20
21       If no files are specified,  these  programs  reads  from  the  standard
22       input.  A line beginning with `.EQ' marks the start of an equation; the
23       end of an equation is marked by a line beginning with  `.EN'.   Neither
24       of  these lines is altered, so they may be defined in macro packages to
25       get centering, numbering, etc.  It is also possible to set two  charac‐
26       ters  as  `delimiters';  subsequent  text  between  delimiters  is also
27       treated as eqn input.  Delimiters may be set to characters x and y with
28       the  command-line  argument  -dxy  or  (more  commonly) with `delim xy'
29       between .EQ and .EN.  The left and right delimiters may  be  identical.
30       Delimiters  are  turned  off  by `delim off'.  All text that is neither
31       between delimiters nor between .EQ and .EN is passed through untouched.
32
33       The program  checkeq  reports  missing  or  unbalanced  delimiters  and
34       .EQ/.EN pairs.
35
36       Tokens within eqn are separated by spaces, tabs, newlines, braces, dou‐
37       ble quotes, tildes or circumflexes.  Braces {} are used  for  grouping;
38       generally  speaking, anywhere a single character like x could appear, a
39       complicated construction enclosed in braces may be used instead.  Tilde
40       ~ represents a full space in the output, circumflex ^ half as much.
41
42       Subscripts and superscripts are produced with the keywords sub and sup.
43       Thus x sub i makes $x sub i$, a sub i sup 2 produces $a sub i  sup  2$,
44       and e sup {x sup 2 + y sup 2} gives $e sup {x sup 2 + y sup 2}$.
45
46       Fractions are made with over: a over b yields $a over b$.
47
48       sqrt  makes  square  roots:  1 over sqrt {ax sup 2 +bx+c} results in $1
49       over sqrt {ax sup 2 +bx+c}$ .
50
51       The keywords from and to introduce lower and upper limits on  arbitrary
52       things:  $lim  from {n-> inf} sum from 0 to n x sub i$ is made with lim
53       from {n-> inf } sum from 0 to n x sub i.
54
55       Left and right brackets, braces, etc., of the  right  height  are  made
56       with  left  and right: left [ x sup 2 + y sup 2 over alpha right ] ~=~1
57       produces $left [ x sup 2 + y sup 2 over alpha right ] ~=~1$.  The right
58       clause  is optional.  Legal characters after left and right are braces,
59       brackets, bars, c and f for ceiling and floor, and ""  for  nothing  at
60       all (useful for a right-side-only bracket).
61
62       Vertical  piles  of things are made with pile, lpile, cpile, and rpile:
63       pile {a above b above c} produces $pile {a above b  above  c}$.   There
64       can  be  an  arbitrary number of elements in a pile.  lpile left-justi‐
65       fies, pile and cpile center, with different vertical spacing, and rpile
66       right justifies.
67
68       Matrices  are made with matrix: matrix { lcol { x sub i above y sub 2 }
69       ccol { 1 above 2 } } produces $matrix { lcol { x sub i above y sub 2  }
70       ccol  {  1 above 2 } }$.  In addition, there is rcol for a right-justi‐
71       fied column.
72
73       Diacritical marks are made with dot,  dotdot,  hat,  tilde,  bar,  vec,
74       dyad,  and  under: x dot = f(t) bar is $x dot = f(t) bar$, y dotdot bar
75       ~=~ n under is $y dotdot bar ~=~ n under$, and x vec ~=~ y dyad  is  $x
76       vec ~=~ y dyad$.
77
78       Sizes  and  font  can be changed with size n or size ±n, roman, italic,
79       bold, and font n.  Size and fonts can be changed globally in a document
80       by gsize n and gfont n, or by the command-line arguments -sn and -fn.
81
82       Normally  subscripts and superscripts are reduced by 3 point sizes from
83       the previous size; this may be changed  by  the  command-line  argument
84       -pn.
85
86       Successive  display  arguments  can be lined up.  Place mark before the
87       desired lineup point in the first equation; place lineup at  the  place
88       that is to line up vertically in subsequent equations.
89
90       Shorthands  may  be defined or existing keywords redefined with define:
91       define thing % replacement % defines a new  token  called  thing  which
92       will  be replaced by replacement whenever it appears thereafter.  The %
93       may be any character that does not occur in replacement.
94
95       Keywords like sum ( sum ) int ( int ) inf ( inf ) and  shorthands  like
96       >=  (>=)  ->  (->),  and  !=  ( != ) are recognized.  Greek letters are
97       spelled out in the desired case, as in alpha  or  GAMMA.   Mathematical
98       words  like sin, cos, log are made Roman automatically.  Troff(1) four-
99       character escapes like \(bs () can be used anywhere.  Strings  enclosed
100       in double quotes "..."  are passed through untouched; this permits key‐
101       words to be entered as text, and can be used to communicate with  troff
102       when all else fails.
103

SEE ALSO

105       troff(1), tbl(1), ms(7), eqnchar(7)
106       B. W. Kernighan and L. L. Cherry, Typesetting Mathematics—User's Guide
107       J. F. Ossanna, NROFF/TROFF User's Manual
108

BUGS

110       To  embolden digits, parens, etc., it is necessary to quote them, as in
111       `bold "12.3"'.
112
113
114
115                                    2/22/74                             EQN(1)
Impressum