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
___________________________________________________________________________________

Reply via email to