From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/42677 Path: news.gmane.org!not-for-mail From: "Mojca Miklavec" Newsgroups: gmane.comp.tex.context Subject: Re: Passing unicode characters Date: Tue, 22 Jul 2008 20:10:29 +0200 Message-ID: <6faad9f00807221110l7bd3c736nf68441cc720b518d@mail.gmail.com> References: <6048c4180807220748k3966db64g4502a9fa68bd30d7@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1216752681 12299 80.91.229.12 (22 Jul 2008 18:51:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jul 2008 18:51:21 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Tue Jul 22 20:52:09 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1KLMy1-0000zS-6k for gctc-ntg-context-518@m.gmane.org; Tue, 22 Jul 2008 20:52:09 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 987841FCD9; Tue, 22 Jul 2008 20:51:11 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07387-01-3; Tue, 22 Jul 2008 20:50:21 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B63B91FC01; Tue, 22 Jul 2008 20:50:18 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 693D31FC2F for ; Tue, 22 Jul 2008 20:50:11 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07387-01-2 for ; Tue, 22 Jul 2008 20:49:32 +0200 (CEST) Original-Received: from yw-out-1718.google.com (yw-out-1718.google.com [74.125.46.155]) by ronja.ntg.nl (Postfix) with ESMTP id C86F81FCF5 for ; Tue, 22 Jul 2008 20:10:30 +0200 (CEST) Original-Received: by yw-out-1718.google.com with SMTP id 5so1401346ywm.74 for ; Tue, 22 Jul 2008 11:10:29 -0700 (PDT) Original-Received: by 10.151.45.6 with SMTP id x6mr5821569ybj.180.1216750229647; Tue, 22 Jul 2008 11:10:29 -0700 (PDT) Original-Received: by 10.151.83.13 with HTTP; Tue, 22 Jul 2008 11:10:29 -0700 (PDT) In-Reply-To: <6048c4180807220748k3966db64g4502a9fa68bd30d7@mail.gmail.com> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:42677 Archived-At: On Tue, Jul 22, 2008 at 4:48 PM, Mehdi Omidali wrote: > Hi everyone, > Is it possible to pass a character to another in MKIV, I mean, like > XeTeX in which one can pass one unicode character to another one (this > is done in some mapping files with some lines in it of the form > U+0030 <> U+06F0 ) There definitely is a way, but I don't know why you would want to do remap numbers on font level. You need such hacks in LaTeX where changing page numbers is a pain, but I would do that with conversions in ConTeXt. "arabic" (starting with U+0660) is already defined. If you need U+06F0, you might need to do minor modification in core-con.*, but try with normal arabic first. \setuppagenumbering [conversion=arabicnumerals] Here are the needed modifications: core-con.lua: ['arabic'] = { 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669 }, you need to add the same for extendedarabic ['extendedarabic'] = { 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669 }, core-con.mkiv: \def\arabicnumerals #1{\ctxlua{converters.alphabetic(\number#1,"arabic")}} \def\extendedarabicnumerals #1{\ctxlua{converters.alphabetic(\number#1,"extendedarabic")}} \defineconversion [arabicnumerals] [\arabicnumerals] \defineconversion [extendedarabicnumerals] [\extendedarabicnumerals] (You also need to modify core-con.mkii if you want the same feature to be available in XeTeX afterwards.) And then you should be able to use \setuppagenumbering [conversion=extendedarabicnumerals] You can also set up itemize to use arabic numbers. What exactly would you like to do with those numbers? Then you can probably get a more precise answer. Mojca ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________