EQN(1)EQN(1)

**unhandled troff command .EQ**

delim $$

**unhandled troff command .EN**

## NAME

eqn – typeset mathematics

## SYNOPSIS

`eqn`*option ...**file ...*

## DESCRIPTION

*Eqn**troff*(1)

`eqn file ... | troff
`

If no files are specified,
*eqn**Eqn*`-T`*dest*`-Tutf`;*troff*(1)).*eqn*

A line beginning with
`.EQ``.EN`.*eqn**x**y*`-d`*xy*`delim`*xy*`.EQ``.EN`.`delim off` .`.EQ``.EN`

Tokens within
*eqn*`x``~``^`

**unhandled troff command .vs**

Subscripts and superscripts are produced with the keywords
`sub``sup`.`x sub i ``a sub i sup 2 ``e sup {x sup 2 + y sup 2} `

`Over``a over b `

`Sqrt``1 over sqrt {ax sup 2 +bx+c} `

The keywords
`from``to``lim from {n -> inf} sum from 0 to n x sub i` .

Left and right brackets, braces, etc., of the right height are made with
`left``right`:`left [ x sup 2 + y sup 2 over alpha right ] ~=~1 ``right``left``right``c``f``""
`for nothing at all (useful for a right-side-only bracket).

Vertical piles of things are made with
`pile`,`lpile`,`cpile`,`rpile`:`pile {a above b above c} ``lpile``pile``cpile``rpile`

Matrices are made with
`matrix`:`matrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } } ``rcol`

**unhandled troff command .vs**

Diacritical marks are made with
`prime`,`dot`,`dotdot`,`hat`,`tilde`,`bar`,`under`,`vec`,`dyad`,`under`:`x sub 0 sup prime = f(t) bar + g(t) under ``x vec = y dyad `

Sizes and fonts can be changed with prefix operators
`size`*n*,`size``±`*n*`,``fat`,`roman`,`italic`,`bold`,`font`*n*.`gsize`*n*`gfont`*n*,`-s`*n*`-f`*n.*

Normally subscripts and superscripts are reduced by
3 point sizes from the previous size;
this may be changed by the command-line argument
`-p`*n.*

Successive display arguments can be lined up.
Place
`mark``lineup`

Shorthands may be defined
or existing keywords redefined with
`define`:`define`*thing*`%`*replacement*`%`*thing**replacement*`%``replacement`.

Keywords like
`sum`

**unhandled troff command .EQ**

( sum ),

**unhandled troff command .EN**

`int`

**unhandled troff command .EQ**

( int ),

**unhandled troff command .EN**

`inf`

**unhandled troff command .EQ**

( inf ),

**unhandled troff command .EN**

and shorthands like
`>=`

**unhandled troff command .EQ**

(>=),

**unhandled troff command .EN**

`->`

**unhandled troff command .EQ**

(->),

**unhandled troff command .EN**

and
`!=`

**unhandled troff command .EQ**

( != )

**unhandled troff command .EN**

are recognized.
Greek letters are spelled out in the desired case, as in
`alpha``GAMMA`.`sin`,`cos`,`log`*Troff*(1)`\(lh`*troff*

## FILES

`/sys/lib/troff/font/devutf`

font descriptions for PostScript

## SOURCE

`/sys/src/cmd/eqn`

## SEE ALSO

*troff*(1),*tbl*(1)

J. F. Ossanna and B. W. Kernighan,
“Troff User’s Manual”.

B. W. Kernighan and L. L. Cherry,
“Typesetting Mathematics*User’s Guide”, *
*Unix Research System Programmer’s Manual,
*Tenth Edition, Volume 2.

## BUGS

To embolden digits, parens, etc.,
it is necessary to quote them,
as in
`bold 12.3` .

**unhandled troff command .EQ**

delim off

**unhandled troff command .EN**