EQN(1) UNIX Programmer's Manual EQN(1)
eqn, neqn, checkeq - typeset mathematics
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
e
\beq
\bqn
\bn [ -
\b-d
\bdxy ] [ -
\b-p
\bpn ] [ -
\b-s
\bsn ] [ -
\b-f
\bfn ] [ file ] ...
c
\bch
\bhe
\bec
\bck
\bke
\beq
\bq [ file ] ...
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
_
\bE_
\bq_
\bn is a troff(1) preprocessor for typesetting mathematics
on a Graphic Systems phototypesetter, _
\bn_
\be_
\bq_
\bn on terminals.
If no files are specified, these programs 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, so
they may be defined in macro packages to get centering,
numbering, etc. It is also possible to set two characters
as `delimiters'; subsequent text between delimiters is also
treated as _
\be_
\bq_
\bn input. Delimiters may be set to characters _
\bx
and _
\by with the command-line argument -
\b-d
\bd_
\bx_
\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 _
\bc_
\bh_
\be_
\bc_
\bk_
\be_
\bq reports missing or unbalanced delimiters
Tokens within _
\be_
\bq_
\bn are separated by spaces, tabs, newlines,
braces, double quotes, tildes or circumflexes. Braces {}
are used for grouping; generally speaking, anywhere a single
character like _
\bx 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
s
\bsu
\bub
\bb and s
\bsu
\bup
\bp.
\b. Thus _
\bx _
\bs_
\bu_
\bb _
\bi makes _
\bx_
\bi, _
\ba _
\bs_
\bu_
\bb _
\bi _
\bs_
\bu_
\bp _
\b2 produces
, and _
\be _
\bs_
\bu_
\bp {_
\bx _
\bs_
\bu_
\bp _
\b2 + _
\by _
\bs_
\bu_
\bp _
\b2} gives _
\be
Fractions are made with o
\bov
\bve
\ber
\br: _
\ba _
\bo_
\bv_
\be_
\br _
\bb yields
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}
v
\b/~~~~~~~~
\b\b\b\b\b\b\b\b_
\ba_
\bx
EQN(1) UNIX Programmer's Manual EQN(1)
The keywords f
\bfr
\bro
\bom
\bm and t
\bto
\bo introduce lower and upper limits on
_
\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:
\b: _
\bl_
\be_
\bf_
\bt [ _
\bx _
\bs_
\bu_
\bp _
\b2 + _
\by _
\bs_
\bu_
\bp _
\b2 _
\bo_
\bv_
\be_
\br
_
\ba_
\bl_
\bp_
\bh_
\ba _
\br_
\bi_
\bg_
\bh_
\bt ] ~=~_
\b1 produces
= 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
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
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
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__
\bn, 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 glo-
bally 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 subse-
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
EQN(1) UNIX Programmer's Manual EQN(1)
whenever it appears thereafter. The % 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. _
\bT_
\br_
\bo_
\bf_
\bf(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
_
\bt_
\br_
\bo_
\bf_
\bf 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
To embolden digits, parens, etc., it is necessary to quote
them, as in `bold "12.3"'.