NEQN(1)
NAME
neqn − format mathematical text for nroff
USAGE
neqn [ −dxy ] [ −pn ] [ −sn ] [ −fn ] [ files ]
DESCRIPTION
Neqn is an nroff (1) preprocessor that formats mathematical text for output to a typewriter-like terminal. Eqn is used for the same purpose with troff (1) and the typesetter. These commands are normally used in this or a similar manner:
eqn files │ troff
neqn files │ nroff
If no files are specified, eqn and neqn read from the standard input. A line beginning with .EQ marks the start of an equation; a line beginning with .EN marks the end of an equation. Neither of these lines is altered, so they may be defined in macro packages to get centering, numbering, etc. It is also possible to designate two characters as delimiters. Subsequent text between delimiters is then treated as eqn input. The left and right delimiters may be the same character; the dollar sign is often used as such a delimiter. Delimiters are turned off by delim off. All text that is not between delimiters or between .EQ and .EN passes through untouched.
Checkeq reports missing or unbalanced delimiters and .EQ/.EN pairs.
Tokens within eqn are separated by spaces, tabs, newlines, braces, double quotes, tildes, and carets. Braces ({}) are used for grouping. Generally speaking, anywhere a single character such as x can appear, a complicated construction enclosed in braces may be used instead. A tilde (~) represents a full space in the output, a caret (^) half as much.
OPTIONS
−dxy Set delimiters to characters x and y. More commonly done with delim xy between .EQ and .EN.
−pn Change the normal reduction of three points from the previous size of subscripts and superscripts to the value of n.
−sn Change point size to the value of n.
−fn. Change font to the value of n.
SPECIAL KEYWORDS
The following list explains the special keywords that can be used with eqn. In addition to these, keywords such as sum (Σ)int (∫)inf (∞)and shorthands like >= (≥)−> (→),and != (≠)are recognized. Greek letters are spelled out in the desired case, as in alpha (α)or GAMMA (γ).Mathematical words such as sin, cos, and log are made roman automatically. Troff (1) four-character escapes such as \(dd (‡) 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 (1) when all else fails.
sub Produce subscripts, e.g., x sub j makes xj.
sup Produce superscripts, e.g., e sup {x sup 2 + y sup 2} makes ex2+y2.
over Produce fractions, e.g., a over b yields ba.
sqrt Produce square roots, e.g., 1 over sqrt {ax sup 2+bx+c} results in \ax2+bx+c1 .
from,to Introduce lower and upper limits, e.g., n→∞lim0Σnxi is made with lim from {n −> inf } sum from 0 to n x sub i.
left,right Make left and right characters of the right height, e.g., left [ x sup 2 + y sup 2 over alpha right ] = 1 produces
⌈
│
⌊x2+αy2
⌉
│
⌋ = 1. Legal characters after left and right are braces, brackets, bars, c and f (for ceiling and floor), and “ ” (for nothing at all; useful for a right-side-only bracket). A left element does not need a matching right element.
pile Create vertical piles, e.g., pile {a above b above c} produces cba. Piles may have an arbitrary number of elements.
lpile Left-justify pile.
rpile Right-justify pile.
cpile Center pile (but with different vertical spacing).
matrix Produce matrices, e.g.,
matrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } } produces
y2xi 21.
lcol Left-justify a column.
ccol Center a column.
rcol Right-justify a column.
dot,
dotdot,
hat,
tilde,
bar,
vec,
dyad,
under Make diacritical marks, e.g., x dot = f(t) bar is x.=f(t), y dotdot bar = n under is y.. = n, and x vec = y dyad is x = y .
sizen Change point size to the value of n.
size±n Increase or decrease point size by the value of n.
roman Change font to roman.
italic Change font to italic.
bold Change font to boldface.
fontn Change font to one specified by argument n.
gsizen Globally change point size in a document to the value of n.
gfontn Globally change font size in a document to the value of n.
mark Specify the desired line-up point in the first equation, to line up successive display arguments. Used in conjunction with lineup.
lineup Specify the place that is to line up vertically in subsequent equations. Used with mark.
define Define shorthands or redefine existing keywords, e.g.,
define thing % replacement % defines a new token called thing that will be replaced by replacement whenever it appears thereafter. The % may be any character that does not occur in replacement.
CAUTIONS
To make digits, parentheses, etc., appear in boldface, you must quote them, as in bold “12.3”.
RELATED INFORMATION
checkeq (1), eqn (1), tbl (1), troff (1), eqnchar (7), ms (7). DOMAIN/IX Text Processing Guide.