home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
APPS
/
lout2.lzh
/
LOUT2
/
DOC
/
TR.EQ
/
s3
< prev
next >
Wrap
Text File
|
1994-01-25
|
3KB
|
81 lines
@Section
@Title { Spacing }
@Begin
@PP
There is a basic rule governing the use of white space characters
(space, tab, and newline) in the input to Lout: white space between two
objects affects the result; white space between a symbol and its
parameter does not.
@PP
Although this rule is just right most of the time, it is not adequate
for equation formatting. Getting the horizontal spacing right in
equations is a very fiddly business, involving four different sizes of
space (zero, thin, medium, and thick), and different rules for spacing
within superscripts and subscripts to those applying outside, according
to a leading authority [{@Ref knuth84}]. Eq therefore takes the spacing
decisions upon itself, and con&-sequently chooses to ignore all white
space in its input, even between two objects.
@FootNote {
This effect is produced by enclosing the entire equation in
{@Code "0c @Space"}. The simplest way to restore the effect of white
space to part of an equation is to enclose that part in a @Code "@Font"
symbol. Eq also changes the value of the @Code v unit, so if a paragraph
of filled text is desired within an equation, it may be necessary to
enclose it in a @Code "@Break" symbol. }
@PP
Every symbol provided by Eq has a {@I {full name}}, which denotes the
symbol without any space attached. Many symbols also
have a {@I {short name}}, which denotes the same symbol with what Eq
considers to be an appropriate amount of space for that symbol attached
to it. For example, @Eq { lessequal } has full name @Code lessequal
and short name {@Code "<="}:
@IL
@LI {
@Code "a lessequal b"
|7ct
@Eq { a lessequal b }
}
@LI {
@Code "a <= b"
|7ct
@Eq { a <= b }
}
@EL
Eq puts a thick space around relation symbols like {@Code "<="}, a
medium space around binary operator symbols like {@Code "+"}, and a thin
space after punctuation symbols (@Code ";" and {@Code ","}); except
that in places where the symbols appear in a smaller size (superscripts,
subscripts, etc.), these spaces are omitted. No other horizontal space
is ever inserted.
@PP
The short names have been carefully designed to produce good-looking
mathematics most of the time. It is best to rely
on them in the first instance and only think about spacing when the result
is not pleasing. In that case, Eq's space can be removed by using the
full names, and thin, medium and thick space can be added using the
following symbols:
@ID @Tab
vmargin { 0.5vx }
@Fmta { @Col A ! @Col B }
{
@Rowa
A { @Code "`" }
B { {@Code "0.18f"} ({@Code "0.018f"} in subscripts, etc.) }
@Rowa
A { @Code "``" }
B { {@Code "0.24f"} ({@Code "0.024f"} in subscripts, etc.) }
@Rowa
A { @Code "```" }
B { {@Code "0.30f"} ({@Code "0.030f"} in subscripts, etc.) }
}
where @Code "1f" is the current font size. These symbols have low
precedence. The @Code "&" symbol from standard Lout is also available;
the @Code "s" unit has value 0 and so is not very useful, but one can
write @Code "&2m" for example for a two em space. The full names are
tedious to remember, so Eq provides a @Code "non" symbol which removes
spaces from its right parameter; thus @Code "non <=" is equivalent to
{@Code "lessequal"}. There are also {@Code "rel"}, {@Code "bin"}, and
{@Code "punct"} symbols for telling Eq to add space to the following symbol as
though it was a relation symbol, binary operator, or punctuation symbol.
@End @Section