EQN(1)

NAME
eqn - format mathematical text for troff

SYNOPSIS
eqn [-d xy []] [-p n []] [-s n []] [-f n []] [-T type []] [ files []] [- []]

DESCRIPTION
eqn is a troff(1) preprocessor for typesetting mathematical text on a phototypesetter. Normal usage is:
    eqn  [options] files | troff  [options] |
If you do not specify files (or if you specify [-] as the last argument), eqn reads the standard input. eqn prepares output for the typesetter that you name in the optional argument [-T type .]

A line beginning with marks the start of an equation; the end of an equation is marked by a line beginning with .EN(.) troff does not alter these lines, so they may be defined in macro packages to get centering, numbering, etc. You may also name two characters as delimiters; eqn treats subsequent text between delimiters as input. You may set delimiters to characters x and y with the command line argument [-d xy] or (more commonly) with xy between and .EN(.) The left and right delimiters may be the same character; the dollar sign is often used as such a delimiter. Turn delimiters off with delim off(.) eqn touches only text that is between delimiters or between and .EN(.)

Set apart keywords recognized by eqn with spaces, tabs, newlines, braces, double quotes, tildes, and circumflexes. Use braces, {}(,) for grouping; generally speaking, anywhere you can use a single character such as x, you may use a complicated construction enclosed in braces instead. Tilde represents a full space in the output, circumflex half as much.

Subscripts and superscripts are produced with the keywords and sup(.) Fractions are made with over(.) makes square roots.

The keywords and introduce lower and upper limits. Left and right brackets, braces, etc., of the right height are made with and right(.) Legal characters after and are braces, brackets, bars, and for ceiling and floor, and for nothing at all (useful for a right-side-only bracket). A thing need not have a matching thing, but a thing must have a matching thing.

Vertical piles of things are made with pile(,) lpile(,) cpile(,) and rpile(.) Piles may have arbitrary numbers of elements; left-justifies, and center (but with different vertical spacing), and right-justifies. Matrices are made with matrix(.) In addition, there is for a right-justified column.

Diacritical marks are made with dot(,) dotdot(,) hat(,) tilde(,) bar(,) vec(,) dyad(,) and under(.)

You may change point sizes and fonts with n or ±n, roman(,) italic(,) bold(,) and n. You may change point sizes and fonts globally in a document by n and n, or by the command line arguments [-s n] and [-f n .]

Normally, subscripts and superscripts are reduced by 3 points from the previous size; you may change this with the command line argument [-p n .]

You can line up successive display arguments. Place before the desired lineup point in the first equation; place at the place that is to line up vertically in subsequent equations.

You may define shorthands or redefine existing keywords with define(:)
    define thing % replacement %
defines a new token called thing that is replaced by replacement whenever it appears thereafter. The may be any character that does not occur in replacement.

Keywords such as sum(,) int(,) inf(,) and shorthands such as >=(,) !=(,) and are recognized. Greek letters are spelled out in the desired case, as in or GAMMA(.) Mathematical words such as sin(,) cos(,) and are made Roman automatically. troff four-character escapes such as which produces the double dagger, may be used anywhere. Strings enclosed in double quotes are passed through untouched; this permits keywords to be entered as text, and can be used to communicate with troff when all else fails. Full details are given in the REFERENCE cited below.

BUGS
To embolden digits, parentheses, etc., it is necessary to quote them, as in bold "12.3"(.) When you use eqn with the MM macro package, displayed equations must appear only inside displays.

SEE ALSO
neqn(1), nroff(1), troff(1), eqnchar(5)

REFERENCE
B. W. Kernighan, L. L. Cherry, Typesetting Mathematics — User's Guide (Second Edition)