ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mehdi Omidali" <mehdioa@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Passing unicode characters
Date: Tue, 22 Jul 2008 23:09:32 +0330	[thread overview]
Message-ID: <6048c4180807221239s2708d86cse35dccef4204cf52@mail.gmail.com> (raw)
In-Reply-To: <6faad9f00807221110l7bd3c736nf68441cc720b518d@mail.gmail.com>

Dear Mojca,
Thanks for your complete answer. In fact, in persian (and maybe
arabic) documents, we need every digit be in persian, like chapter,
section, figure, and even formula numbers (most of the people even
prefer persian digits in formulas which is possible in xetex).
As you know, the Mapping=farsidigits in a font definition works
perfect in xelatex.
Best wishes.

On 7/22/08, Mojca Miklavec <mojca.miklavec.lists@gmail.com> wrote:
> 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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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
___________________________________________________________________________________


  reply	other threads:[~2008-07-22 19:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22 14:48 Mehdi Omidali
2008-07-22 15:23 ` Idris Samawi Hamid ادريس سماوي حامد
2008-07-22 16:31   ` Mehdi Omidali
2008-07-22 18:14   ` Mehdi Omidali
2008-07-22 18:40     ` Idris Samawi Hamid
2008-07-22 19:24       ` Mehdi Omidali
2008-07-22 19:42         ` Aditya Mahajan
2008-07-22 20:50           ` Mehdi Omidali
2008-07-23  6:37             ` Wolfgang Schuster
2008-07-27 21:25               ` Khaled Hosny
2008-07-27 22:38                 ` Mehdi Omidali
2008-07-28 14:41                   ` Hans Hagen
2008-07-22 18:10 ` Mojca Miklavec
2008-07-22 19:39   ` Mehdi Omidali [this message]
2008-07-22 21:21     ` Mojca Miklavec
2008-07-23 17:52       ` Mehdi Omidali
2008-07-27 12:39         ` Taco Hoekwater
2008-07-28 14:37       ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6048c4180807221239s2708d86cse35dccef4204cf52@mail.gmail.com \
    --to=mehdioa@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).