ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Idris Samawi Hamid" <ishamid@colostate.edu>
Subject: Re: arab (omega)
Date: Sun, 25 Jun 2006 13:54:22 -0600	[thread overview]
Message-ID: <op.tbpv8wjcnx1yh1@walayah-main> (raw)
In-Reply-To: <op.tbppynqsnx1yh1@walayah-main>

Dear gang,

I have redone this. Now there are two filter sequences, one for main text  
and one for using the arabic-font digits in math mode.

http://wiki.contextgarden.net/Aleph_Guide#Installing

has been updated, get the new uni2cuni.zip. I'll update m-gamma soon so  
this will be part of the distro if Hans accepts-)

Here is a test file that works here. Note (see the sqrt example) that  
omarb apparently does not have U+066B, the Arabic decimal point. And the  
Arabic comma maps to the lm comma in math mode (since omarb maps the  
arabic comma to U+002C in the omarb virtual
font-sigh). So there is further work needed to get this all just right,  
including recompiling the fonts etc...

Best
Idris

==================================================
% tex=aleph output=dvipdfmx

\usetypescriptfile[type-omg]
\usetypescript[OmegaArab]
\hoffset=0pt

%% Individual Filters
% Input filters (from what you type)
\definefiltersynonym [UTF8]      [inutf8]

% Contextual filter
\definefiltersynonym [UniCUni]            [uni2cuni]

\definefiltersynonym [UniCUniMath]        [uni2cuni-math]

% Output filters (font mapping)
\definefiltersynonym [CUniArab]           [cuni2oar]

%% Filter Sequences
\definefiltersequence
   [UTFArabic]
   [UTF8,UniCUni,CUniArab]

\definefiltersequence
   [UTFArabicMath]
   [UTF8,UniCUniMath,CUniArab]

\appendtoks
     \clearocplists
     \usefiltersequence[UTFArabicMath]
\to \everymathematics

% For global Arabic script

\def\ArabicDirGlobal{%
\pagedir TRT\bodydir TRT\textdir TRT\pardir TRT }%

\def\ArabicUTF{\ArabicDirGlobal\usefiltersequence[UTFArabic]
                 \reversesectionnumberstrue\switchtobodyfont[omarb]}

\ArabicUTF

\starttext

5792-684 $5792-684$ ${\tf 5792-684}$

2.5 $\sqrt{\tf 2.5}$

2,5 $\sqrt{\tf 2،5}$ $\sqrt{\tf 2,5}$

\stoptext
==================================================

On Sun, 25 Jun 2006 11:38:37 -0600, Idris Samawi Hamid  
<ishamid@colostate.edu> wrote:

> On Sun, 25 Jun 2006 02:08:37 -0600, Taco Hoekwater <taco@elvenkind.com>
> wrote:
>
>> My guess is you could just remove the punctuation support from the
>> current OTP. If a user really needs to say "1.2 million", (s)he can
>> just write  $1.2$ instead, which is more or less standard TeX
>> practice anyway.
>>
>> It is my understanding that the contents of $$ is unaffected by
>> OTPs (and if it is not, it should be made so. Math is a language
>> on its own).
>
> ok, it's done. The new ocp is here:
> http://wiki.contextgarden.net/images/2/27/Uni2cuni.zip
>
> and the instructions are here:
>
> http://wiki.contextgarden.net/Aleph_Guide#Installing
>
> Now, in normal text, +, -, and . are treated as separators, not plus  
> sign,
> minus, and decimal point. If you want math use $$ etc. but then you will
> get the math font not omarb (which is standard practice in the
> Arabic-script world).
>
> I have no idea if this affects Hans' solution (have not upgraded yet);
> this is all experimental so things may change.
>
> An aside: Classical Arabic is more sensical. Consider the number 3721. In
> classical Arabic one says, "one and twenty and and seven hundred and  
> three
> thousand", which makes much more sense for a r-l language. So one would
> write the numeral from r to l and it would look the same. How decimals
> would be handled in the classical case needs a bit of research
>
> Best
> Idris

-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

  reply	other threads:[~2006-06-25 19:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-23 18:59 Hans Hagen
2006-06-24 16:37 ` Idris Samawi Hamid
2006-06-24 17:25   ` Idris Samawi Hamid
2006-06-25  8:08     ` Taco Hoekwater
2006-06-25 17:38       ` Idris Samawi Hamid
2006-06-25 19:54         ` Idris Samawi Hamid [this message]
2006-06-25 16:01     ` Hans Hagen
2006-06-25 18:34       ` Idris Samawi Hamid
2006-06-25  6:37   ` Taco Hoekwater
2006-06-25 15:57   ` Hans Hagen
     [not found] <mailman.196.1151291766.1824.ntg-context@ntg.nl>
2006-06-26  7:56 ` Duncan Hothersall
2006-06-26 20:14   ` Idris Samawi Hamid
2006-06-26  9:59 ` Duncan Hothersall
2006-06-26 14:21   ` 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=op.tbpv8wjcnx1yh1@walayah-main \
    --to=ishamid@colostate.edu \
    --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).