[XeTeX] Converting from arabtex to arabxetex

Khaled Hosny khaledhosny at eglug.org
Wed Aug 18 15:12:06 CEST 2010


On Wed, Aug 18, 2010 at 08:55:55AM -0400, Lomky wrote:
> Hello,
> 
> I am attempting to make a Perl script that takes in Arabic text in code page 6
> (just glancing at it, I see an ascii range of C7 to ED) and converts it out
> into Arabic script in a pdf document. I had the code working almost completely
> with just LaTeX and arabtex, but the Arabic output was left to right and was
> not connecting the script into words. After a bit of research, I decided to try
> xetex and arabxetex. However, now my code comes directly out as
> the Latin characters, instead of being translated. I assume this is because
> xetex assumes input in utf-8 (I think?), where latex assumed something else. It
> does now format right to left, at least at a sentence level.

Your best option is to convert the Arabic text Unicode before outputting
the TeX file, since you are already processing it with Perl and I assume
Perl have some encoding conversion utilities (or, if you are running a
*nix system, you can pipe your text through iconv and convert it).

Alternatively, you can try inputenc (or xinputenc, I don't recall the
exact name if the xetex compatible package), but this might not be as
robust as using Unicode input.

Regards,
 Khaled


-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


More information about the XeTeX mailing list