HP-UX Reference (11i v2 03/08) - 1 User Commands N-Z (vol 2)
n
neqn(1) neqn(1)
NAME
neqn - format mathematical text for nroff
SYNOPSIS
neqn [-dxy][-s
n][-fn][-pn][file]...
Remarks
The output of
neqn is very device-dependent. See the WARNINGS section.
The examples shown approximate the results in a
dtterm window. To see the actual results on an out-
put device, send the output of the
man neqn command directly to the device.
DESCRIPTION
neqn is a preprocessor for nroff (see nroff(1)) for typesetting mathematical text on typewriter-like ter-
minals. Its invocation is almost always one of the following two forms or equivalent:
neqn file... | nroff | col
tbl file... | neqn | nroff | col
If no files are specified (or if
- is specified instead of file), neqn reads from standard input. A line begin-
ning 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, which means that they can be defined in
nroff macro packages to
get centering, numbering, etc.
Delimiters
It is also possible to designate two characters as delimiters ; subsequent text between delimiters is then
treated as
neqn input. Delimiters can be set to characters x and y with the command-line argument
-
d
xy or (more commonly) with the sequence
.EQ
delim xy
.EN
The left and right delimiters can be the same character; the dollar sign ($) is often used as such a delim-
iter. Delimiters are turned off by delim off (see the WARNINGS section). All text that is neither
between delimiters nor between
.EQ and .EN is passed through untouched.
Separators and Metacharacters
Tokens within
neqn equations are separated by spaces, tabs, newlines, braces, double quotes, tildes, and
circumflexes. Braces ({}) are used for grouping; generally speaking, anywhere a single character such as
x can appear, a complicated construction enclosed in braces can be used instead. Tilde (˜) represents a
full space in the output; circumflex (
ˆ), half as much.
Subscripts and Superscripts
Subscripts and superscripts are produced using
sub and sup as follows:
Source Text Result
x sub j x
j
a sub k sup 2 2
ak
esup{xsup2+ysup2} 2+y2
ex
HP-UX 11i Version 2: August 2003 − 1 − Hewlett-Packard Company Section 1−−569