Cannot make \digits work with palatino
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
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 -----------------------------------------------------------------
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
-----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-----
participants (3)
-
Aditya Mahajan
-
Alexandre Patry
-
Hans Hagen