.\" Copyright (c) 1990 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\" @(#)eqn.1 6.4 (Berkeley) 6/26/90
for typesetting mathematics
on a Graphic Systems phototypesetter,
.Dl neqn file ... | nroff
If no files are specified,
read from the standard input.
A line beginning with `.EQ' marks the start of an equation;
is marked by a line beginning with `.EN'.
Neither of these lines is altered,
so they may be defined in macro packages
centering, numbering, etc.
It is also possible to set two characters as `delimiters';
subsequent text between delimiters is also treated as
Delimiters may be set to characters
with the command-line argument
The left and right delimiters may be identical.
Delimiters are turned off by `delim off'.
All text that is neither between delimiters nor between .EQ and .EN
is passed through untouched.
reports missing or unbalanced delimiters and .EQ/.EN pairs.
spaces, tabs, newlines, braces, double quotes,
Braces {} are used for grouping;
anywhere a single character like
could appear, a complicated construction
enclosed in braces may be used instead.
Tilde ~ represents a full space in the output,
circumflex ^ half as much.
Subscripts and superscripts are produced with the keywords
$e sup {x sup 2 + y sup 2}$.
$1 over sqrt {ax sup 2 +bx+c}$ .
introduce lower and upper limits on arbitrary things:
$lim from {n-> inf} sum from 0 to n x sub i$
.Ar "lim from {n\-> inf }
Left and right brackets, braces, etc., of the right height are made with
$left [ x sup 2 + y sup 2 over alpha right ] ~=~1$.
are braces, brackets, bars,
and "" for nothing at all (useful for a right-side-only bracket).
Vertical piles of things are made with
.Ar "pile {a above b above c}"
$pile {a above b above c}$.
There can be an arbitrary number of elements in a pile.
center, with different vertical spacing,
.Ar "matrix { lcol { x sub i
.Ar above y sub 2 } ccol {
$matrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } }$.
for a right-justified column.
Diacritical marks are made with
$y dotdot bar ~=~ n under$,
Sizes and font can be changed with
Size and fonts can be changed globally in a document by
or by the command-line arguments
Normally subscripts and superscripts are reduced by
3 point sizes from the previous size;
this may be changed by the command-line argument
Successive display arguments can be lined up.
before the desired lineup point in the first equation;
at the place that is to line up vertically in subsequent equations.
Shorthands may be defined
or existing keywords redefined with
.Ar "define thing \&% replacement \&%"
defines a new token called
which will be replaced by
whenever it appears thereafter.
may be any character that does not occur in
Greek letters are spelled out in the desired case, as in
Mathematical words like sin, cos, log are made Roman automatically.
four-character escapes like \e(bs (\(bs)
Strings enclosed in double quotes "..."
are passed through untouched;
this permits keywords to be entered as text,
and can be used to communicate
B. W. Kernighan and L. L. Cherry,
.Em Typesetting Mathematics\-User's Guide
.Em NROFF/TROFF User's Manual
appeared in Version 6 AT&T Unix.
To embolden digits, parens, etc.,
it is necessary to quote them,