diff options
Diffstat (limited to 'tex/context/base/math-ini.tex')
-rw-r--r-- | tex/context/base/math-ini.tex | 43 |
1 files changed, 36 insertions, 7 deletions
diff --git a/tex/context/base/math-ini.tex b/tex/context/base/math-ini.tex index d78a9e4fc..a9f93a4f4 100644 --- a/tex/context/base/math-ini.tex +++ b/tex/context/base/math-ini.tex @@ -500,13 +500,42 @@ %D Taco posted this solution as response to a mail by Olivier, so %D let's integrate it here. -\def\setmathfunctionstyle#1% \rm \ss \tt - {\def\mfunction##1% no families, just scaling a la text - {\mathchoice - {\hbox{\csname#1\endcsname\tf ##1}} - {\hbox{\csname#1\endcsname\tf ##1}} - {\hbox{\csname#1\endcsname\tfx ##1}} - {\hbox{\csname#1\endcsname\tfxx##1}}}} +% \def\setmathfunctionstyle#1% rm ss tt +% {\def\mfunction##1% no families, just scaling a la text +% {\mathchoice +% {\hbox{\csname#1\endcsname\tf ##1}} +% {\hbox{\csname#1\endcsname\tf ##1}} +% {\hbox{\csname#1\endcsname\tfx ##1}} +% {\hbox{\csname#1\endcsname\tfxx##1}}}} + +\def\currentmscaledstyle{rm} % will be plugged into the typeface text=ss option + +\def\setmathfunctionstyle#1% rm ss tt + {\doifsomething{#1} + {\def\currentmscaledstyle{#1}% + \def\mathopnolimits##1{\mathop{\mscaledtext{##1}}\nolimits}% + \def\mfunction##1{\mscaledtext{##1}}}} + +\def\mscaledtext#1% + {\mathchoice + {\hbox{\csname\currentmscaledstyle\endcsname\tf #1}} + {\hbox{\csname\currentmscaledstyle\endcsname\tf #1}} + {\hbox{\csname\currentmscaledstyle\endcsname\tfx #1}} + {\hbox{\csname\currentmscaledstyle\endcsname\tfxx#1}}} + +%D We can force the way functions are typeset by manipulating the text +%D option: +%D +%D \starttyping +%D \definetypeface[iwona][ss][sans][iwona][default][encoding=texnansi] +%D \definetypeface[iwona][mm][math][iwona][default][encoding=texnansi,text=ss] +%D \stoptyping +%D +%D This hooks into the math handler with: + +\appendtoks + \setmathfunctionstyle\currentmathtextstyle +\to \everybodyfont %D Usage: %D |