In some parts of my document, I have text inside of math mode, to position text, e.g.:
\math{
\overset{
\text{This text is above.}
}
{
\text{This text is below.}
}
}
I found that any text placed inside \text{} inside \math{} will appear using the Serif body font, even within environments defined as Sans Serif, e.g.:
\starttypescript[serif][stsong]
\definefontsynonym[stsong][name:stsong][features=chinese]
\stoptypescript
\starttypescript[sans][stheiti]
\definefontsynonym[stheiti][name:stheiti][features=chinese]
\stoptypescript
\starttypescript[serif][stsong]
\definefontsynonym[Serif][stsong][features=chinese]
\stoptypescript
\starttypescript[sans][stheiti]
\definefontsynonym[Sans][stheiti][features=chinese]
\stoptypescript
\definetypeface[stsong][rm][serif][stsong]
\definetypeface[stheiti][ss][sans][stheiti]
\setupbodyfont[stsong, 12pt]
\starttext
{\stheiti This is some text.\math{\text{This is some more text.}}This is yet some more text.}
\stoptext
- Placing font definitions inside
\text{}, such as\text{\stheiti Text.}is not a good solution, because much of this text is in macros which can appear in different places, such as in San Serif chapter titles, or in the main Serif text of the document. - Setting a single font for math mode will also not be suitable for the same reason.
How can I set the font inside text mode inside math mode to the font of the text surrounding it?

\textinamsmathfor LaTeX. Probably ConTeXt is trying to be too smart. :) – egreg Oct 20 '12 at 23:44\text. But why are you using math mode for aligning text? What exactly do you want to do? There are better solutions than resorting to math mode for alignment. – Aditya Oct 21 '12 at 2:05\textcommand matching those of the surrounding text. I haveConTeXt ver: 2012.05.30 11:26 MKIV fmt: 2012.8.21 int: english/english. – Andrew Swann Oct 23 '12 at 9:56