BSD 4_3_Reno development
[unix-history] / usr / share / man / cat1 / eqn.0
EQN(1) UNIX Reference Manual EQN(1)
N\bNA\bAM\bME\bE
e\beq\bqn\bn,\b, n\bne\beq\bqn\bn, c\bch\bhe\bec\bck\bke\beq\bq - typeset mathematics
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
e\beq\bqn\bn [-\b-d\bd_\bx_\by] [-\b-p\bp_\bn] [-\b-s\bs_\bn] [-\b-f\bf_\bn] [file] ...
c\bch\bhe\bec\bck\bke\beq\bq [file] ...
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
E\bEq\bqn\bn is a troff(1) preprocessor for typesetting mathematics on a Graphic
Systems phototypesetter, neqn on terminals. Usage is almost always
eqn file ... | troff
neqn file ... | nroff
If no files are specified, these programs read 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, so they may be defined in macro packages to get center-
ing, numbering, etc. It is also possible to set two characters as `del-
imiters'; subsequent text between delimiters is also treated as e\beq\bqn\bn in-
put. Delimiters may be set to characters _\bx and _\by with the command-line
argument -\b-d\bd -\b-x\bxy\by or (more commonly) with `delim _\bx_\by ' between .EQ and .EN.
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.
The program c\bch\bhe\bec\bck\bke\beq\bq reports missing or unbalanced delimiters and .EQ/.EN
pairs.
Tokens within e\beq\bqn\bn are separated by spaces, tabs, newlines, braces, double
quotes, tildes or circumflexes. Braces {} are used for grouping; gen-
erally speaking, anywhere a single character like _\bx could appear, a com-
plicated 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 s\bsu\bub\bb and s\bsu\bup\bp.
Thus _\bx _\bs_\bu_\bb _\bi makes _\bx_\bi, _\ba _\bs_\bu_\bb _\bi _\bs_\bu_\bp _\b2 produces _\ba_\bi
2
, and _\be _\bs_\bu_\bp {_\bx _\bs_\bu_\bp _\b2 + _\by
_\bs_\bu_\bp _\b2}" gives _\be
_\bx2+_\by2
.
Fractions are made with o\bov\bve\ber\br: _\ba _\bo_\bv_\be_\br _\bb yields
_\bb
_\ba\b_.
s\bsq\bqr\brt\bt makes square roots: _\b1 _\bo_\bv_\be_\br _\bs_\bq_\br_\bt {_\ba_\bx _\bs_\bu_\bp _\b2 +_\bb_\bx+_\bc}" results in
v\b/~~~~~~~~\b\b\b\b\b\b\b\b_\ba_\bx
2
+_\bb_\bx+_\bc
1\b\b\b\b\b_________ .
The keywords f\bfr\bro\bom\bm and t\bto\bo introduce lower and upper limits on arbitrary
things:
_\bn->oo
lim
0
_\b>\b_\b~
_\bn
_\bx_\bi is made with _\bl_\bi_\bm _\bf_\br_\bo_\bm {_\bn-> _\bi_\bn_\bf } _\bs_\bu_\bm _\bf_\br_\bo_\bm _\b0 _\bt_\bo _\bn _\bx _\bs_\bu_\bb
_\bi."
Left and right brackets, braces, etc., of the right height are made with
l\ble\bef\bft\bt and r\bri\big\bgh\bht\bt: [_\bl_\be_\bf_\bt] _\bx _\bs_\bu_\bp _\b2 + _\by _\bs_\bu_\bp _\b2 ~=~_\b1" produces
|\b
|\b
|
_\bx
2
+
_\bo\b(
_\by
2
__
|\b
|\b
|
= 1.
The r\bri\big\bgh\bht\bt clause is optional. Legal characters after l\ble\bef\bft\bt and r\bri\big\bgh\bht\bt are
braces, brackets, bars, c\bc and f\bf for ceiling and floor, and "" for nothing
at all (useful for a right-side-only bracket).
Vertical piles of things are made with p\bpi\bil\ble\be, l\blp\bpi\bil\ble\be, c\bcp\bpi\bil\ble\be, and r\brp\bpi\bil\ble\be:
_\bp_\bi_\bl_\be {_\ba _\ba_\bb_\bo_\bv_\be _\bb _\ba_\bb_\bo_\bv_\be _\bc} produces
_\bc
_\bb
_\ba
. There can be an arbitrary number of
elements in a pile. l\blp\bpi\bil\ble\be left-justifies, p\bpi\bil\ble\be and c\bcp\bpi\bil\ble\be center, with
different vertical spacing, and r\brp\bpi\bil\ble\be right justifies.
Matrices are made with m\bma\bat\btr\bri\bix\bx: _\bm_\ba_\bt_\br_\bi_\bx { _\bl_\bc_\bo_\bl { _\bx _\bs_\bu_\bb _\bi _\ba_\bb_\bo_\bv_\be _\by _\bs_\bu_\bb _\b2 }
_\bc_\bc_\bo_\bl { _\b1 _\ba_\bb_\bo_\bv_\be _\b2 } }" produces
_\by2
_\bx_\bi
2
1
. In addition, there is r\brc\bco\bol\bl for a
right-justified column.
Diacritical marks are made with d\bdo\bot\bt, d\bdo\bot\btd\bdo\bot\bt, h\bha\bat\bt, t\bti\bil\bld\bde\be, b\bba\bar\br, v\bve\bec\bc, d\bdy\bya\bad\bd,
and u\bun\bnd\bde\ber\br: _\bx _\bd_\bo_\bt = _\bf(_\bt) _\bb_\ba_\br is _\bx\b.=_\bf(_\bt)\b\b\b\b~~~~, _\by _\bd_\bo_\bt_\bd_\bo_\bt _\bb_\ba_\br ~=~ _\bn _\bu_\bn_\bd_\be_\br" is
_\by\b..\b\b~ = _\bn\b_, and _\bx _\bv_\be_\bc ~=~ _\by _\bd_\by_\ba_\bd is _\bx\b->= _\by\b<-\b\b->\b.
Sizes and font can be changed with s\bsi\biz\bze\be [_\bn] or s\bsi\biz\bze\be +\b+\b\b\b_\b_n, r\bro\bom\bma\ban\bn, i\bit\bta\bal\bli\bic\bc,
b\bbo\bol\bld\bd, and f\bfo\bon\bnt\bt _\bn. Size and fonts can be changed globally in a document
by g\bgs\bsi\biz\bze\be _\bn and g\bgf\bfo\bon\bnt\bt _\bn, or by the command-line arguments -\b-s\bs_\bn and -\b-f\bf_\bn.
Normally subscripts and superscripts are reduced by 3 point sizes from
the previous size; this may be changed by the command-line argument -\b-p\bp_\bn.
Successive display arguments can be lined up. Place m\bma\bar\brk\bk before the
desired lineup point in the first equation; place l\bli\bin\bne\beu\bup\bp at the place
that is to line up vertically in subsequent equations.
Shorthands may be defined or existing keywords redefined with d\bde\bef\bfi\bin\bne\be:
_\bd_\be_\bf_\bi_\bn_\be _\bt_\bh_\bi_\bn_\bg % _\br_\be_\bp_\bl_\ba_\bc_\be_\bm_\be_\bn_\bt % defines a new token called _\bt_\bh_\bi_\bn_\bg which will
be replaced by _\br_\be_\bp_\bl_\ba_\bc_\be_\bm_\be_\bn_\bt whenever it appears thereafter. The %\b% may be
any character that does not occur in _\br_\be_\bp_\bl_\ba_\bc_\be_\bm_\be_\bn_\bt.
Keywords like _\bs_\bu_\bm (_\b>\b_\b~) _\bi_\bn_\bt () _\bi_\bn_\bf (oo) and shorthands like >= (>\b_) -> (->),
and != (=\b/) are recognized. Greek letters are spelled out in the desired
case, as in _\ba_\bl_\bp_\bh_\ba or _\bG_\bA_\bM_\bM_\bA. Mathematical words like sin, cos, log are
made Roman automatically. Troff(1) four-character escapes like \(bs ()
can 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(1) when all else fails.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
troff(1), tbl(1), ms(7), eqnchar(7)
B. W. Kernighan and L. L. Cherry, _\bT_\by_\bp_\be_\bs_\be_\bt_\bt_\bi_\bn_\bg _\bM_\ba_\bt_\bh_\be_\bm_\ba_\bt_\bi_\bc_\bs-_\bU_\bs_\be_\br'_\bs _\bG_\bu_\bi_\bd_\be J.
F. Ossanna, _\bN_\bR_\bO_\bF_\bF/_\bT_\bR_\bO_\bF_\bF _\bU_\bs_\be_\br'_\bs _\bM_\ba_\bn_\bu_\ba_\bl
H\bHI\bIS\bST\bTO\bOR\bRY\bY
E\bEq\bqn\bn appeared in Version 6 AT&T Unix.
B\bBU\bUG\bGS\bS
To embolden digits, parens, etc., it is necessary to quote them, as in
`bold "12.3"'.