ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: units module has bug with markIV?
Date: Sat, 20 Sep 2008 12:28:28 +0200	[thread overview]
Message-ID: <48D4D04C.2040700@elvenkind.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0809200405590.26730@nqv-yncgbc>

Aditya Mahajan wrote:
> 
> I am just writing to say that I looked at your original message, but 
> could not figure out what is going wrong. \Micro is expanded to μ, but 
> then something
> goes wrong.
> 
> Hans, Taco, can you see what is happening here?

That took some thinking. The error is caused by the \mathcode of µ,
it is "7116, but it should be "0116. The '7' in the current
definition makes it switch along with \fam. \dimensiontypeface
expands to \tf, so \fam is set to 11, and that is \rm.

So you end up with this minimal file:

    \starttext
    $\rm µ$ % that's U+03BC
    \stoptext

The latin modern text (\rm) font does not have a greek alphabet.
If it did, all would have worked ok. Since that cannot easily be
fixed and I suspect most text fonts do not have greek, so changing
the mathcode of the greek characters is probably the best solution
(it affects normal math mode as well, as you can see)

And as an aside, it would be nicer to use U+00B5 (mu latin) in the
units module instead of U+03BC (mu greek).

   \def\Micro {\dimensionprefix{\iftextdimensions u\else\hbox{µ}\fi}}

The \hbox is needed because \fam11 is using ec encoding, I think.
(and that is problematic in its own way, but let's not go there)


Best wishes,
Taco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2008-09-20 10:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-03  1:36 Chen Shen
2008-09-20  5:19 ` Chen Shen
2008-09-20  8:09   ` Aditya Mahajan
2008-09-20 10:28     ` Taco Hoekwater [this message]
2008-09-21  4:23       ` Chen Shen

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=48D4D04C.2040700@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).