|
|
(5 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | == mathstackers ==
| + | moved to [[Math/stackers]] |
− | | |
− | ConTeXt has a nice structure in order to define new math commands in which some characters are stacked over another one.
| |
− | A typical example is when you want to put a small circle on top of a letter (as one would when defining the topological interior of a set…).
| |
− | To do so we define first a new stacker named here {{code|l=MySymbol}}, and then invoking that we define two new commands {{code|l=\interior}} and {{code|l=\starred}}
| |
− | | |
− | \definemathstackers[MySymbol]
| |
− | [voffset=-.3\mathexheight,
| |
− | hoffset=\zeropoint,
| |
− | mathclass=ord,
| |
− | topoffset=.4\mathemwidth, % poor man's italic correction
| |
− | middlecommand=\mathematics]
| |
− |
| |
− | %\definemathstackers[symbol][voffset=-.30\mathexheight,hoffset=\zeropoint]
| |
− | \definemathover[MySymbol][interior]["2218]
| |
− | \definemathover[MySymbol][starred]["2717]
| |
− | \starttext
| |
− | | |
− | %Here is the new command \type{\interiorset{K}}: $\mathring{K} \neq \interiorset{K}$
| |
− | | |
− | Here is the new command \type{\interior{K}}: $\interior{K}$. Compare this to \type{\mathring{K}}: $\mathring{K}$.
| |
− | | |
− | Here is the new command \type{\starred{K}}: $\starred{K}$
| |
− | | |
− | \stoptext
| |