[XeTeX] arabxetex utf vocalization options

François Charette firmicus at ankabut.net
Tue Jun 23 13:52:33 CEST 2009


Gareth Hughes a écrit :
> Juan Acevedo wrote:
>   
>> From a sentence in p.5 of arabxetex manual,
>>
>> " There are also advantages of  choosing an ArabTEX mapping (i.e., one
>> of the novoc, voc and fullvoc modes) even with UTF-8 encoding, as it
>> provides easy access to special glyphs and some useful features. See
>> further below."
>>     
What I meant by this is that you can type Arabic directly in UTF-8 but
benefit from additional features defined in the arabxetex mappings that
would be difficult to type directly or that would display poorly in most
editors, such as Qur'anic symbols, ornate parentheses, etc.

>> I gather it should be possible to modify the Arabic vocalization even
>> when the input is directly in UTF8 Arabic. Is this wishful reading? If
>> not, I would much appreciate help achieving this. So far, if I say, for
>> instance,
>>
>> \textarab[utf,novoc]{ يُحْيِيْ وَيُمِيْتُ}
>>
>> compilation stops saying something like "no novoc mapping in utf mode".
>>     

This is very easy to implement (see the attached mapping
arabic-utf-novoc.map). I will add it to the next version (with the
option utf-novoc), but in the meanwhile please use the attached compiled
mapping and report any problem you may encounter. You simply need
something like this:

\newcommand\textarabnovoc[1]{\RL{\arabicfont\addfontfeature{Mapping=arabic-utf-novoc}#1}}

\textarabnovoc{يُحْيِيْ وَيُمِيْتُ}

If you want to suppress sukun and/or shadda as well, then add them to
the mapping and recompile it with teckit_compile.

> This would be greatly desirable. After all, one point of XeTeX is that
> we shouldn't have to use mappings. All non-ASCII-able writing systems
> are easier to read in their own orthography rather than through a
> mapping. 
I agree in general. But there are special cases where the opposite is
true, especially when doing typography.

> Arabic is far easier to read in Arabic script than in
> transliteration, just as 'café' is easier to read than 'caf\'e', but
> even more so. It is often necessary to provide transliterations for
> those who cannot read the script, but it's far easier to type the Arabic
> than to type the transliteration.
>   

Indeed. For most purposes, when writing Arabic directly as UTF-8,
ArabXeTeX is not necessary. One can use polyglossia instead, or just bidi.

>> Alternatively, in a worst-case scenario, does anyone know or can suggest
>> a painless way to convert (lots of) utf Arabic into ArabTeX-encoded Arabic?
>>     

Now you shouldn't need this. But as a side note, you and others may be
interested to know that the TECkit mappings provided with ArabXeTeX can
also be used to convert from ArabTeX to UTF-8 externally (but not
conversely):

   
tecmap="/usr/share/texmf-dist/fonts/misc/xetex/fontmapping/arabxetex/arabtex-fdf2alif-novoc.tec"
    txtconv -nobom -t $tecmap -i inputfile -o outputfile

(The txtconv utility is part of TECkit <http://scripts.sil.org/teckit>).

There is also a Perl module which for converting Arabic encodings:
http://search.cpan.org/dist/Encode-Arabic/

FC
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: arabic-utf-novoc.map
URL: <http://tug.org/pipermail/xetex/attachments/20090623/a05191ba/attachment.pl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arabic-utf-novoc.tec
Type: application/octet-stream
Size: 185 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20090623/a05191ba/attachment.obj>


More information about the XeTeX mailing list