From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55450 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Cannot make \digits work with palatino Date: Mon, 4 Jan 2010 18:39:43 -0500 (EST) Message-ID: References: <4B40D630.40002@iro.umontreal.ca> <4B421FE7.8010203@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1262648434 16731 80.91.229.12 (4 Jan 2010 23:40:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Jan 2010 23:40:34 +0000 (UTC) Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 05 00:40:26 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1NRwX8-0005XF-GY for gctc-ntg-context-518@m.gmane.org; Tue, 05 Jan 2010 00:40:22 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 97247C9C33; Tue, 5 Jan 2010 00:40:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RKbOpuMLF-3Y; Tue, 5 Jan 2010 00:40:19 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 61CA8C9B66; Tue, 5 Jan 2010 00:40:18 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 79FF5C9B66 for ; Tue, 5 Jan 2010 00:40:14 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id LBxxOSG3e8RG for ; Tue, 5 Jan 2010 00:39:57 +0100 (CET) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by balder.ntg.nl (Postfix) with ESMTP id 054F7C9B4F for ; Tue, 5 Jan 2010 00:39:56 +0100 (CET) Original-Received: FROM dhcp128036206219.central.yale.edu (dhcp128036206219.central.yale.edu [128.36.206.219]) By hellskitchen.mr.itd.umich.edu ID 4B427C49.2A3C9.27280 ; Authuser adityam; 4 Jan 2010 18:39:53 EST In-Reply-To: <4B421FE7.8010203@wxs.nl> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:55450 Archived-At: 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 ___________________________________________________________________________________