[NTG-context] How to \bf for math?

Mojca Miklavec mojca.miklavec.lists at gmail.com
Sun Jan 15 12:07:05 CET 2006

Hello,

What exactly is the ConTeXt alternative to LaTeX's \mathbf (switch to
bold or bold italic math fonts)?

(Btw: is it better to use bold or bold italic for typesetting vectors?
We use "overrightharpoonup", so I don't know what an international
standard says.)

I understand the main commands for switching the font in text (rm, tt,
ss for family and tf, sl, it, bf, bs, bi, sc + an optional
x/xx/a/b/c/d), but I didn't understand yet what to use for math.

~~~
As an intermezzo: is there any way to ger small caps slanted? \sc will
do the small caps, but \sl switches to normal slanted font (no small
caps) again. I suppose that the current model (set of current font
definitions) doesn't account for the possibility of using small caps
slanted or small caps bold (slanted). Is there any elegant way to do
that, for example by defining new commands such as \scbf, \scit, \scbi
[+ xx/x/a/b/c/d]? (I can still use other tricks to get those fonts,
but some general scheme for using them could be useful for others as
well.)
~~~

I tried to use the examples described in mfonts.pdf, but I can't get
those examples working. (I probably used too few definitions when more
definitions are required at once to make the examples work.)
I also tried the command from one of Adam's articles,
\def\mfunction#1{{\em#1}}, to get italic euler math font, but without
success.

I managed to use "bold math" as a whole (on the example of iwona which
has different weights of math fonts):
\starttypescript [math] [iwona-heavy] [default]
\definefontsynonym [Iwona-Math-Letters-Heavy]       [rm-iwonah]
\definefontsynonym [Iwona-Math-Letters-HeavyItalic] [mi-iwonahi]
\definefontsynonym [Iwona-Math-Symbols-Heavy]       [sy-iwonahz]
\definefontsynonym [Iwona-Math-Extension-Heavy]     [ex-iwonah]
\stoptypescript
\starttypescript [math] [iwona-heavy] [name]
\definefontsynonym [MathRoman]     [Iwona-Math-Letters-Heavy]
\definefontsynonym [MathItalic]    [Iwona-Math-Letters-HeavyItalic]
\definefontsynonym [MathSymbol]    [Iwona-Math-Symbols-Heavy]
\definefontsynonym [MathExtension] [Iwona-Math-Extension-Heavy]
\stoptypescript
\definetypeface [iwona] [mm] [math] [iwona-heavy] [default]

But I can't get ant further than that, so that I could switch between
"thin" and "bold".

I tried
\starttypescript [boldmath] [iwona-heavy] [name]
\definefontsynonym [MathRomanBold]     [Iwona-Math-Letters-Heavy]
...
\starttypescript %[boldmath] [iwona-heavy] [default]
\definebodyfont [boldmath] [mm]
[(bf)mr=MathRomanBold mo 1, ...]
...
and different settings in starttypescript/definebody font ... but no
success at all.

I would like to create some definitions, so that I could easily say
(write a command) "I want the light version for regular math and the
regular font for bold math" or "I want the regular version for regular
and the heavy version for bold math".

Thanks a lot for help,
Mojca