From: Aditya Mahajan <adityam@umich.edu>
To: Hans Hagen <pragma@wxs.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Cannot make \digits work with palatino
Date: Mon, 4 Jan 2010 18:39:43 -0500 (EST) [thread overview]
Message-ID: <alpine.LNX.2.01.1001041829200.14043@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <4B421FE7.8010203@wxs.nl>
On Mon, 4 Jan 2010, Hans Hagen wrote:
> On 3-1-2010 18:38, Alexandre Patry wrote:
>> Hi,
>>
>> when I use the \digits command with default fonts, everything work fine.
>> However, when I set the fonts to palatino, the following documents
>> print "1:234;56" instead of "1.234,56"
>>
>> 8<---------------------------------
>> \usetypescript[palatino][ec]
>> \definetypeface [palatino] [mm] [math] [euler] [euler][rscale=1.03]
>> \setupbodyfont[palatino,12pt]
>>
>> \starttext
>> \digits{1.234,56}
>> \stoptext
>> 8<---------------------------------
>>
>> Am I doing something wrong?
>
> it's euler related, not palatino so let's redirect this to aditya
It works if you change the definition of \dohandledigits to the following
\def\dohandledigits
{\mathcode`\,="003B \mathcode`\.="003A % were 013B and 013A
\expandafter\handletokens\collecteddigits\with\scandigits
\ifcase\powerdigits\else\digitpowerseparator^{\savedpowerdigits}\fi}
This is because euler takes , and . from mr family (family 0) while in
other fonts they come from mi (family 1).
I don't understand why the mathcode needs to be changed inside
dohandledigits, do cannot figure out a way to fix the bug. One option can
be to store the mathcode of , and . before we start manipulating digits,
and then restore them to their original values (something like that
\pushcatcodetable and \popcatcodetable).
Aditya
___________________________________________________________________________________
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2010-01-04 23:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-03 17:38 Alexandre Patry
2010-01-04 17:05 ` Hans Hagen
2010-01-04 23:39 ` Aditya Mahajan [this message]
2010-01-05 0:31 ` Alexandre Patry
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=alpine.LNX.2.01.1001041829200.14043@ybpnyubfg.ybpnyqbznva \
--to=adityam@umich.edu \
--cc=ntg-context@ntg.nl \
--cc=pragma@wxs.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).