program for typesetting mathematics
on the Graphics Systems phototypesetters on
language was designed to be easy to use
by people who know neither mathematics
knows relatively little about mathematics.
In particular, mathematical symbols like
+, \(mi, \(mu, parentheses, and so on have no special meanings.
is quite happy to set garbage (but it will look good).
works as a preprocessor for the typesetter formatter,
so the normal mode of operation is to prepare
a document with both mathematics and ordinary text
set the mathematics while
does the body of the text.
will also produce mathematics on
The input is identical, but you have to use the programs
Of course, some things won't look as good
don't provide the variety of characters, sizes and fonts
but the output is usually adequate for proofreading.
use is discussed in section 26.
where a mathematical expression begins and ends,
we mark it with lines beginning
your output will look like
are copied through untouched;
are not otherwise processed
This means that you have to take care
of things like centering, numbering, and so on
The most common way is to use the
macro package package `\(mims'
developed by M. E. Lesk[3],
which allows you to center, indent, left-justify and number equations.
With the `\(mims' package,
equations are centered by default.
To left-justify an equation, use
Any of these can be followed by an arbitrary `equation number'
which will be placed at the right margin.
There is also a shorthand notation so
We will talk about it in section 19.
Spaces and newlines within an expression are thrown away by
(Normal text is left absolutely alone.)
You should use spaces and newlines freely to make your input equations
readable and easy to edit.
In particular, very long lines are a bad idea,
since they are often hard to fix if you make a mistake.
To force extra spaces into the
You can also use a circumflex ``^'',
which gives a space half the width of a tilde.
It is mainly useful for fine-tuning.
Tabs may also be used to position pieces
but the tab stops must be set by
.SC "Symbols, Special Names, Greek"
knows some mathematical symbols,
some mathematical names, and the Greek alphabet.
x=2 pi int sin ( omega t)dt
x = 2 pi int sin ( omega t)dt
Here the spaces in the input are
are separate entities that should get special treatment.
digit 2, and parentheses are set in roman type instead of italic;
becomes the integral sign.
When in doubt, leave spaces around separate parts of the input.
without leaving spaces on both sides of the
as a special word, and it appears as
names appears in section 23.
Knowledgeable users can also use
for the Bell System sign \(bs.
can deduce that some sequence
of letters might be special
is if that sequence is separated from the letters
This can be done by surrounding a special word by ordinary spaces
as we did in the previous section.
You can also make special words stand out by surrounding them
with tildes or circumflexes:
x~=~2~pi~int~sin~(~omega~t~)~dt
is much the same as the last example,
but also add extra spaces,
x~=~2~pi~int~sin~(~omega~t~)~dt
Special words can also be separated by braces { }
which have special meanings that we will
.SC "Subscripts and Superscripts"
Subscripts and superscripts are
takes care of all the size changes and vertical motions
needed to make the output look right.
must be surrounded by spaces;
$x sub2$ instead of $x sub 2$.
Furthermore, don't forget to leave a space
to mark the end of a subscript or superscript.
Subscripted subscripts and superscripted superscripts
A subscript and superscript on the same thing
are printed one above the other
Other than this special case,
$x sup {y sub z}$, not ${x sup y} sub z$.
.SC "Braces for Grouping"
Normally, the end of a subscript or superscript is marked
simply by a blank (or tab or tilde, etc.)
What if the subscript or superscript is something that has to be typed
In that case, you can use the braces
beginning and end of the subscript or superscript:
to treat something as a unit,
or just to make your intent perfectly clear.
which is rather different.
Braces can occur within braces if necessary:
e sup {i pi sup {rho +1}}
e sup {i pi sup {rho +1}}
The general rule is that anywhere you could use some single
you can use an arbitrarily complicated thing if you enclose
will look after all the details of positioning it and making
In all cases, make sure you have the
Leaving one out or adding an extra will cause
Occasionally you will have to
enclose them in double quotes,
Quoting is discussed in more detail in section 14.
The line is made the right length and positioned automatically.
Braces can be used to make clear what goes over what:
{alpha + beta} over {sin (x)}
{alpha + beta} over {sin (x)}
What happens when there is both an
In such an apparently ambiguous case,
which decide which operation is done first in cases like this
are summarized in section 23.
to make clear what goes with what.
To draw a square root, use
sqrt a+b + 1 over sqrt {ax sup 2 +bx+c}
sqrt a+b + 1 over sqrt {ax sup 2 +bx+c}
Warning _ square roots of tall quantities look lousy,
big enough to cover the quantity is
sqrt {a sup 2 over b sub 2}
sqrt{a sup 2 over b sub 2}
Big square roots are generally better written as something
(a sup 2 /b sub 2 ) sup half
(a sup 2 /b sub 2 ) sup half
.SC "Summation, Integral, Etc."
Summations, integrals, and similar constructions
sum from i=0 to {i= inf} x sup i
sum from i=0 to {i= inf} x sup i
braces to indicate where the upper
No braces were necessary for the lower part $i=0$,
because it contained no blanks.
The braces will never hurt,
parts contain any blanks, you must use braces around them.
they have to occur in that order.
Other useful characters can replace the
int ~~~~~~ prod ~~~~~~ union ~~~~~~ inter
Since the thing before the
even something in braces,
can often be used in unexpected ways:
lim from {n \(mi> inf} x sub n =0
lim from {n-> inf} x sub n =0