ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Adam Lindsay <atl@comp.lancs.ac.uk>
Subject: Re: How to \bf for math?
Date: Thu, 16 Feb 2006 20:20:05 +0000	[thread overview]
Message-ID: <43F4DE75.4040209@comp.lancs.ac.uk> (raw)
In-Reply-To: <6faad9f00601160908k6e940d9fk58b57cfa1de68839@mail.gmail.com>

Mojca Miklavec wrote:
> Taco, thanks for the answer. I managed to change the whole math family
> into bold, but I can't get the following example working:
> 
> \switchtobodyfont[iwona-light,ss]
> $$normal {\bf bold}{\bfm bold}{\bfmath bold}$$
> 
> \bf and \bfmath result in cm fonts, \bfm has no influence, no matter
> what I tried to do. I grep-ed for bfmath and boldmath and tried to
> replace them, but no success at all. See the attached file for my
> attempts.

Okay, thanks to some off-list prodding, I took a look. Mojca, you 
weren't too far off. Simply following the recipe for lucida got me most 
of the way there, but the normal letters didn't get inflected (bold-ed).
When I explicitly defined the alphabet, then the rest of the problems I 
saw got solved.

Try this out with a lot more test cases, and report back. If it's okay, 
then it should be easy to formalise it into a robust, more complete set 
of typescripts...

\startmathcollection[default] %eventual patch for math-tex?
\definemathcharacter [a]   [nothing] [mi] ["61]
\definemathcharacter [b]   [nothing] [mi] ["62]
\definemathcharacter [c]   [nothing] [mi] ["63]
\definemathcharacter [d]   [nothing] [mi] ["64]
\definemathcharacter [e]   [nothing] [mi] ["65]
\definemathcharacter [f]   [nothing] [mi] ["66]
\definemathcharacter [g]   [nothing] [mi] ["67]
\definemathcharacter [h]   [nothing] [mi] ["68]
\definemathcharacter [i]   [nothing] [mi] ["69]
\definemathcharacter [j]   [nothing] [mi] ["6A]
\definemathcharacter [k]   [nothing] [mi] ["6B]
\definemathcharacter [l]   [nothing] [mi] ["6C]
\definemathcharacter [m]   [nothing] [mi] ["6D]
\definemathcharacter [n]   [nothing] [mi] ["6E]
\definemathcharacter [o]   [nothing] [mi] ["6F]
\definemathcharacter [p]   [nothing] [mi] ["70]
\definemathcharacter [q]   [nothing] [mi] ["71]
\definemathcharacter [r]   [nothing] [mi] ["72]
\definemathcharacter [s]   [nothing] [mi] ["73]
\definemathcharacter [t]   [nothing] [mi] ["74]
\definemathcharacter [u]   [nothing] [mi] ["75]
\definemathcharacter [v]   [nothing] [mi] ["76]
\definemathcharacter [w]   [nothing] [mi] ["77]
\definemathcharacter [x]   [nothing] [mi] ["78]
\definemathcharacter [y]   [nothing] [mi] ["79]
\definemathcharacter [z]   [nothing] [mi] ["7A]
\definemathcharacter [A]   [nothing] [mi] ["41]
\definemathcharacter [B]   [nothing] [mi] ["42]
\definemathcharacter [C]   [nothing] [mi] ["43]
\definemathcharacter [D]   [nothing] [mi] ["44]
\definemathcharacter [E]   [nothing] [mi] ["45]
\definemathcharacter [F]   [nothing] [mi] ["46]
\definemathcharacter [G]   [nothing] [mi] ["47]
\definemathcharacter [H]   [nothing] [mi] ["48]
\definemathcharacter [I]   [nothing] [mi] ["49]
\definemathcharacter [J]   [nothing] [mi] ["4A]
\definemathcharacter [K]   [nothing] [mi] ["4B]
\definemathcharacter [L]   [nothing] [mi] ["4C]
\definemathcharacter [M]   [nothing] [mi] ["4D]
\definemathcharacter [N]   [nothing] [mi] ["4E]
\definemathcharacter [O]   [nothing] [mi] ["4F]
\definemathcharacter [P]   [nothing] [mi] ["50]
\definemathcharacter [Q]   [nothing] [mi] ["51]
\definemathcharacter [R]   [nothing] [mi] ["52]
\definemathcharacter [S]   [nothing] [mi] ["53]
\definemathcharacter [T]   [nothing] [mi] ["54]
\definemathcharacter [U]   [nothing] [mi] ["55]
\definemathcharacter [V]   [nothing] [mi] ["56]
\definemathcharacter [W]   [nothing] [mi] ["57]
\definemathcharacter [X]   [nothing] [mi] ["58]
\definemathcharacter [Y]   [nothing] [mi] ["59]
\definemathcharacter [Z]   [nothing] [mi] ["5A]
\stopmathcollection

\starttypescript [bfmath,boldmath] [iwona] [ec,texnansi]
                                  % we want this in iwona namespace
   \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 [boldmath] [iwona] [name]
                                              % we don't use this yet
   \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

\starttypescript [bfmath] [iwona] [name]
                          % key typescript, with MathRomanBold et al
   \definefontsynonym [MathRomanBold]     [Iwona-Math-Letters-Heavy]
   \definefontsynonym [MathItalicBold]    [Iwona-Math-Letters-HeavyItalic]
   \definefontsynonym [MathSymbolBold]    [Iwona-Math-Symbols-Heavy]
   \definefontsynonym [MathExtensionBold] [Iwona-Math-Extension-Heavy]
\stoptypescript


\setupformulas  [method=bold]     % magical incantation

\usetypescript [iwona] [texnansi] % defined in type-exa

\definetypeface [iwona] [mm] [bfmath] [iwona] [default]
                                   % add to the loaded typeface

\setupbodyfont[iwona]  % and go

\starttext
\startformula
n({\bfm a} + {\bfm b}) = {\bfm \Gamma}
\stopformula
\startformula
1 \theta \Gamma = {\bfm 1 \beta \Gamma \alpha ' xP} x
\stopformula
\startformula
1 \theta \Gamma = {1 \beta \Gamma \alpha ' x} x
\stopformula
\stoptext

[apologies for the length, you digest readers...]
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Adam T. Lindsay, Computing Dept.     atl@comp.lancs.ac.uk
  Lancaster University, InfoLab21        +44(0)1524/510.514
  Lancaster, LA1 4WA, UK             Fax:+44(0)1524/510.492
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  parent reply	other threads:[~2006-02-16 20:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-15 11:07 Mojca Miklavec
2006-01-15 12:48 ` Henning Hraban Ramm
2006-01-15 14:59   ` Mojca Miklavec
2006-01-15 18:11     ` Hans Hagen
2006-01-16 11:06       ` Taco Hoekwater
2006-01-16 17:08         ` Mojca Miklavec
2006-01-16 17:59           ` Taco Hoekwater
2006-02-16 20:20           ` Adam Lindsay [this message]
2006-02-16 20:40             ` Adam Lindsay
2006-02-17 10:36               ` Taco Hoekwater
2006-02-17 17:24               ` David Munger
2006-02-17 18:23                 ` Adam Lindsay
2006-02-17 19:09                   ` David Munger
2006-02-17 19:56                     ` Adam Lindsay
2006-02-17 20:10                       ` David Munger
2006-02-17 21:37                       ` Hans Hagen
2006-02-18 11:56                         ` Taco Hoekwater
2006-01-16 17:26       ` Mojca Miklavec
2006-01-16 18:00 ` David Munger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43F4DE75.4040209@comp.lancs.ac.uk \
    --to=atl@comp.lancs.ac.uk \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).