Hi, I would like to set the font used for math functions like \sin to be the body font. Of course, it should go for scriptsize when used in exponents. I tried without success to define \def\mfunction#1{{\tf\rm #1}} What is the conTeXt way to do this? Thanks for your help, Olivier
billet@eurecom.fr wrote:
Hi,
I would like to set the font used for math functions like \sin to be the body font. Of course, it should go for scriptsize when used in exponents.
But they do that already, at least in the default font setup. Well, you can try this: \def\mfuction#1% {\mathchoice {\hbox{\rm \tf #1}} {\hbox{\rm \tf #1}} {\hbox{\rm \tfx #1}} {\hbox{\rm \tfxx #1}}} Cheers, Taco
Quoting "Taco Hoekwater" :
-- was taco@elvenkind.com on Aug 13, 2005 at 12:20:44PM --
But they do that already, at least in the default font setup. $ grep '\\def\\mfunction' /usr/share/texmf/tex/context/base/* /usr/share/texmf/tex/context/base/math-ini.tex:\def\mfunction#1{{\mr#1}}
\def\mfuction#1% {\mathchoice {\hbox{\rm \tf #1}} {\hbox{\rm \tf #1}} {\hbox{\rm \tfx #1}} {\hbox{\rm \tfxx #1}}} Many thanks, that was what I was looking for. Olivier
billet@eurecom.fr wrote:
Quoting "Taco Hoekwater" :
-- was taco@elvenkind.com on Aug 13, 2005 at 12:20:44PM --
But they do that already, at least in the default font setup.
$ grep '\\def\\mfunction' /usr/share/texmf/tex/context/base/* /usr/share/texmf/tex/context/base/math-ini.tex:\def\mfunction#1{{\mr#1}}
Yes, I know. That definies does give me computer modern regular upright, scaled properly. Taco
billet@eurecom.fr wrote:
Quoting "Taco Hoekwater" :
-- was taco@elvenkind.com on Aug 13, 2005 at 12:20:44PM --
But they do that already, at least in the default font setup.
$ grep '\\def\\mfunction' /usr/share/texmf/tex/context/base/* /usr/share/texmf/tex/context/base/math-ini.tex:\def\mfunction#1{{\mr#1}}
\def\mfuction#1% {\mathchoice {\hbox{\rm \tf #1}} {\hbox{\rm \tf #1}} {\hbox{\rm \tfx #1}} {\hbox{\rm \tfxx #1}}}
Many thanks, that was what I was looking for.
Ok, I added thsi to math-ini: %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}}}} %D Usage: %D %D \starttyping %D \setmathfunctionstyle\fontstyle % or {rm} or {ss} or .. %D \rm test $\sin{(x^{\sin(x^{\sin(x)})})}$ test %D \ss test $\sin{(x^{\sin(x^{\sin(x)})})}$ test %D \tt test $\sin{(x^{\sin(x^{\sin(x)})})}$ test %D \stoptyping so, you can follow the style automatically Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
billet@eurecom.fr
-
Hans Hagen
-
Taco Hoekwater