summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/math/math-combining.tex
blob: 5cd2ccb9b342f58d9a73c0d0c92e856578ba66f2 (plain)
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
\environment math-layout

\startcomponent math-combining

\startchapter[title=Combining formulas]

Multiple formulas can be combined by wrapping them:

\startbuffer

\fakewords{20}{30}

\startformula
    a + b = c
\stopformula

\fakewords{20}{30}

\startformulas
    \startformula
        a + b = c
    \stopformula
    \startformula
        d - e = f
    \stopformula
\stopformulas

\fakewords{20}{30}

\startformulas
    \startformula
        \frac{\frac{x}{y}}{b} = c
    \stopformula
    \startformula
        d - e = f
    \stopformula
\stopformulas

\fakewords{20}{30}
\stopbuffer

\typebuffer

When we bump the space around formulas to \type {big} we get this:

\start
    \setupformulas[spacebefore=big,spaceafter=big]
    \appendtoks\showmakeup[reset]\to\everymath
    \showboxes
    \getbuffer
\stop

The formulas get aligned on the baselline which in turn relates to the
math axis of the formula.

\stopchapter

\stopcomponent