aboutsummaryrefslogtreecommitdiffstats
path: root/doc/user/equ_intr
blob: 1c3ea378f241d86dbb828c7ce8dabc6d66ab7c7e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@Section
   @Title { Introduction }
@Begin
@PP
The Lout definitions for the @Code "@Eq" symbol are accessed via a setup
file called {@Code "eq"}, which you must include at the start of your
document if
eq.file @Index { @Code "eq" file }
you want equations, like this:
@ID @OneRow @Code {
"@SysInclude { tbl }"
"@SysInclude { eq }"
"@SysInclude { doc }"
"@Doc @Text @Begin"
"..."
"@End @Text"
}
This shows what to do if you want both tables and equations, but you
may leave out the line for tables if you don't want them.  Setup files
for specialized packages, such as {@Code "tab"} and {@Code "eq"},
are best included before the main setup file, but may be included in
any order.
@PP
With the @Code "eq" file included, you may write
@ID @Code "@Eq { ... }"
at any point in your document, and the symbols of @Code "@Eq" will be
available between the braces.  Any symbols available outside continue
to be available inside, which means that equations may be freely mixed
with other symbols, without restriction.
@PP
Equations may appear within a paragraph of text, or they may be
displayed.  {@Code "@Eq"}'s job is to produce an object containing the
equation; it neither knows nor cares where this equation goes.
@PP
To display an equation, use a display symbol like @Code "@IndentedDisplay"
or @Code "@CentredDisplay" (Section {@NumberOf displays}).  For example,
@ID @Code "@CentredDisplay @Eq { int supp pi on 0 sin ` x = 0 }"
produces
@CentredDisplay @Eq { int supp pi on 0 sin ` x = 0 }
There are also symbols for aligned and numbered displays, which are
very commonly used with equations.  These symbols are the subject of
Section {@NumberOf mathdisplays}.
@PP
To get an equation within a paragraph, it is best to use a variant of
@Code "@Eq" called {@Code "@E"}.  An equation within @Code "@E { ... }"
will be prevented from breaking across two lines, and its superscripts
will appear slightly lower, which is desirable within paragraphs.
equations. @RawIndex { equations }
equations.e @SubIndex { @Code "@E" }
eaaa.equations @Index { @Code "@E" (equations) }
@PP
In this chapter we show the Lout input at the left, and its
result at the right:
@ID {
@Code "@Eq { {x sup 2 + y sup 2} over 2 }"
|7ct
@Eq { {x sup 2 + y sup 2} over 2 }
}
Subsequent examples will omit the enclosing {@Code "@Eq { ... }"}.
@End @Section