math-framing-001.tex /size: 2114 b    last modification: 2021-10-28 13:50
1% language=us runpath=texruns:manuals/math
2
3\setuplayout[topspace=5mm,bottomspace=5mm,height=middle,header=1cm,footer=0cm]
4
5\starttext
6
7\startbuffer[sample]
8    \enabletrackers[formulas.framed] \showboxes
9    \startformula
10        e = mc^2
11    \stopformula
12    \par
13    \startformula
14        e = mc^2
15    \stopformula
16    \startformula
17        e = mc^2
18    \stopformula
19    \startformula
20        e \dorecurse{12} { = mc^2 }
21    \stopformula
22    \startplaceformula
23        \startformula
24            e = mc^2
25        \stopformula
26    \stopplaceformula
27    \startplaceformula
28        \startformula
29            e \dorecurse{12} { = mc^2 }
30        \stopformula
31    \stopplaceformula
32\stopbuffer
33
34\startbuffer[setup-b]
35\setupformula
36  [option=frame]
37\stopbuffer
38
39\startbuffer[setup-d]
40\setupformulaframed
41  [frame=on,
42  %toffset=10pt,
43  %boffset=10pt,
44   foregroundcolor=white,
45   background=color,
46   backgroundcolor=gray]
47\stopbuffer
48
49\startbuffer[setup-c]
50\setupformula
51  [frame=number]
52\stopbuffer
53
54\startbuffer[all]
55\start
56    \typebuffer[setup-a]
57    \getbuffer[setup-a]
58    \getbuffer[sample]
59    \typebuffer[setup-b]
60    \typebuffer[setup-d]
61    \getbuffer[setup-b]
62    \getbuffer[setup-d]
63    \getbuffer[sample]
64    \typebuffer[setup-c]
65    \getbuffer[setup-c]
66    \getbuffer[sample]
67    \page
68\stop
69\stopbuffer
70
71\startbuffer
72    \startbuffer[setup-a]
73    \setupformula
74      [align=flushleft]
75    \stopbuffer
76    \getbuffer[all]
77    \startbuffer[setup-a]
78    \setupformula
79      [align=flushleft,location=left]
80    \stopbuffer
81    \getbuffer[all]
82
83    \startbuffer[setup-a]
84    \setupformula
85      [align=middle]
86    \stopbuffer
87    \getbuffer[all]
88    \startbuffer[setup-a]
89    \setupformula
90      [align=middle,location=left]
91    \stopbuffer
92    \getbuffer[all]
93
94    \startbuffer[setup-a]
95    \setupformula
96      [align=flushright]
97    \stopbuffer
98    \getbuffer[all]
99    \startbuffer[setup-a]
100    \setupformula
101      [align=flushright,location=left]
102    \stopbuffer
103    \getbuffer[all]
104\stopbuffer
105
106\getbuffer
107
108\startbuffer[setup-b]
109\setupformula
110  [option={tight,frame}]
111\stopbuffer
112
113\getbuffer
114
115\stoptext
116