Changes

Jump to navigation Jump to search
1,078 bytes added ,  13:03, 30 August 2017
Created page with "== 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..."
== 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 {{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
106

edits

Navigation menu