ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
Subject: Re: How to \bf for math?
Date: Sat, 18 Feb 2006 12:56:53 +0100	[thread overview]
Message-ID: <43F70B85.5070006@elvenkind.com> (raw)
In-Reply-To: <43F64203.7080202@wxs.nl>

[-- Attachment #1: Type: text/plain, Size: 1593 bytes --]

Hans Hagen wrote:

> (concerning the definemathcharacters, we need input from taco on that
> because he knows what goes on deep inside tex and has done complex
> math typesetting for ages)

The \definemathcharacter macro is a actually quite simple, it is
mostly a  syntactic wrapper around \mathcode and \delcode assignments.
See the attached chunk of --module documentation text.

Whether mixed bold/unbold math is feasible depends mostly on two things:
* if bold symbolic fonts are available (math italic, symbol and
   extension)
* how you define the variable symbols (latin characters) and
   font switches.

Normally, an 'a' is of mathtype 'variable' (7), so that if you do
${\bf a}$, you get a bold (fam 6) one instead of the one from the
math italic (fam 1).
When you redefine its mathcode so it becomes an `ord' (0) in a
`bold math italic' family (say 'A' or so. You cannot use \bi since
that is a match for \it, and it will not have the same spacing
rules!); afterward it no longer obey font switches.

If you want to get back to the upright version in such a setup,
you have to redefine te \rm command to change the math family code
yet again, to 'ord' in upright math (fam 0), this time.

All this shuffling about with mathcodes is needed because during a
single formula, TeX stores tokens in the form (family id, chararacter).
Only at the very end of the formula are the families themselves
mapped to fonts (and the tokens converted to using those fonts),
so changing the \textfont0 etc. assignments while in the formula
does not help.

I hope this is clear enough.

Cheers, Taco


[-- Attachment #2: definemathcharacter.tex --]
[-- Type: application/x-tex, Size: 4224 bytes --]

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

  reply	other threads:[~2006-02-18 11:56 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
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 [this message]
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=43F70B85.5070006@elvenkind.com \
    --to=taco@elvenkind.com \
    --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).