* Cannot make \digits work with palatino
@ 2010-01-03 17:38 Alexandre Patry
2010-01-04 17:05 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Patry @ 2010-01-03 17:38 UTC (permalink / raw)
To: ntg-context
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?
Thanks,
Alexandre
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Cannot make \digits work with palatino
2010-01-03 17:38 Cannot make \digits work with palatino Alexandre Patry
@ 2010-01-04 17:05 ` Hans Hagen
2010-01-04 23:39 ` Aditya Mahajan
0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2010-01-04 17:05 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Cannot make \digits work with palatino
2010-01-04 17:05 ` Hans Hagen
@ 2010-01-04 23:39 ` Aditya Mahajan
2010-01-05 0:31 ` Alexandre Patry
0 siblings, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2010-01-04 23:39 UTC (permalink / raw)
To: Hans Hagen; +Cc: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Cannot make \digits work with palatino
2010-01-04 23:39 ` Aditya Mahajan
@ 2010-01-05 0:31 ` Alexandre Patry
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Patry @ 2010-01-05 0:31 UTC (permalink / raw)
To: mailing list for ConTeXt users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/04/2010 06:39 PM, Aditya Mahajan wrote:
> 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}
Thank you very much, it works perfectly!
Alexandre
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJLQoh5AAoJEAMYf3C80LjbQ9UH/i+E4CpAfmubkHfPP5zaWga5
lz6ICqTM3gkAwgOfXs0yWif4GS5WBwRhM7AaZfEHJ+zlgjJi/iyKua7cNvEf+OrT
tkaNgNeQuQ2f1U3A0iwyA0+0YyBtUj4tfv+YblcKs9QMYWa/s5NCci1hK/16lvhJ
IoBU1+5ywIDX1Zvl8EGEDEDZnbDcwG5gtx/W+xaR38o3/wSNoEtywNW5M8AHwO+3
eS5ue4u2QFhoXtfvYsLbCp4CNIF86eAhuYaSUKv7GJKNOFoKUdgYUD5bGKHaz/nV
yse531LilFaXlFTlJsbbJDjW3rsDljK849yKF9lkukPtjst1nFl1o9+jm/YgRc4=
=Ja9Y
-----END PGP SIGNATURE-----
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-05 0:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-03 17:38 Cannot make \digits work with palatino Alexandre Patry
2010-01-04 17:05 ` Hans Hagen
2010-01-04 23:39 ` Aditya Mahajan
2010-01-05 0:31 ` Alexandre Patry
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).