.SC "Shorthand for In-line Equations"
In a mathematical document,
it is necessary to follow mathematical conventions
not just in display equations,
but also in the body of the text,
for example by making variable names like $x$ italic.
Although this could be done by surrounding the appropriate parts
the continual repetition of
Furthermore, with `\(mims',
imply a displayed equation.
provides a shorthand for short in-line expressions.
You can define two characters to mark the left and right ends
of an in-line equation, and then type expressions right in the middle of text
To set both the left and right characters to dollar signs, for example,
add to the beginning of your document the three lines
Having done this, you can then say things like
Let %alpha sub i% be the primary variable,
Then we can show that %x sub 1% is %>=0%.
spaces, newlines, and so on are significant
in the text, but not in the equation part itself.
Multiple equations can occur in a single input line.
Enough room is left before and after a line that contains
$sum from i=1 to n x sub i$
does not interfere with the lines surrounding it.
To turn off the delimiters,
Warning: don't use braces, tildes, circumflexes, or double quotes as delimiters _
provides a facility so you can give
a frequently-used string of characters a name,
and thereafter just type the name instead of the
For example, if the sequence
x sub i sub 1 + y sub i sub 1
appears repeatedly throughout a paper,
you can save re-typing it each time by defining it like this:
define xy 'x sub i sub 1 + y sub i sub 1'
a shorthand for whatever characters occur between the single quotes
You can use any character instead of quote to mark the ends of the definition,
so long as it doesn't appear inside the definition.
will expand into what it was defined as.
Be careful to leave spaces or their equivalent
when you actually use it, so
will be able to identify it as special.
There are several things to watch out for.
First, although definitions can use previous definitions,
don't define something in terms of itself'
A favorite error is to say
This is a guaranteed disaster,
now defined in terms of itself.
and everything works fine.
keywords can be redefined.
If you need different things
to print on a terminal and on the typesetter, it is sometimes worth
defining a symbol differently in
only takes effect if you are running
the definition only applies for
tries to get most things at the right place on the paper,
it isn't perfect, and occasionally you will need to tune
the output to make it just right.
Small extra horizontal spaces can be obtained with
to move small amounts horizontally.
is how far to move in 1/100's of an em (an em is about the width
moves back about half the width of an m.
Similarly you can move things up or down with
the local motions affect the next thing in the input,
and this can be something arbitrarily complicated if it is enclosed