[NTG-context] arab (omega)
Idris Samawi Hamid
ishamid at colostate.edu
Sun Jun 25 21:54:22 CEST 2006
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 at colostate.edu> wrote:
> On Sun, 25 Jun 2006 02:08:37 -0600, Taco Hoekwater <taco at 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/
More information about the ntg-context
mailing list