mathstackers
mathstackers
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 {{{1}}}
, and then invoking that we define two new commands {{{1}}}
and {{{1}}}
\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