[XeTeX] Bug in XeTeX 0.997?

Youssef Jabri yjabri at ensa.univ-oujda.ac.ma
Wed Jan 16 20:32:18 CET 2008

Hi everybody,

Thanks Ross for confirming this.

 > While that runs without error messages, it is not the
 > "correct" (intended) meaning of the code...
 > While they may load without errors, they are probably not performing
 > their intended function (which is probably not needed anyway in  
 > To read a file like this "correctly" with xetex, you'd need to set
 > the input encoding form to "bytes". Then for the UTF-8 macro support
 > to work as intended, you'd need to do the same with the actual text
 > files, too. But far better to forget all this and simply allow xetex
 > to process the UTF-8 text natively.

Well, let me explain the context where this  situation happened.
I was trying to add some new functionalities to Arabi in addition to  
making the older ones available to both eTeX and XeTeX.

One thing that was missing was the possibility to get transliteration  
within Arabi, a thing that ArabTeX does very well and François
implemented (I do not know at what level with the current version)  
with ArabXeTeX.

Since Arabi is compatible with ArabTeX, i.e. we can use ArabTeX within  
Arabi documents, the idea to try to use it to get transliteration
is more or less immediate :-)

This works very well with ASCII input for ArabTeX, moreover, thanks to  
xunicode and fontspec we can use any font while ArabTeX does the  
I hope there is some way to get transliteration even with UTF-8 input  
encoding, letting XeTeX go in "raw" input LOCALLY for the sake of  
doing this specific job.

I am afraid not to get 1% of Prof. Lagally skills in TeX programming  
for whom I have a lot of respect and admiration.

Here is a [snippet] that works of what I was doing just to show you  
(Jonathan :-) ) the utility of the matter. It compiles with both  
pdfTeX and XeTeX 0.996.
I attach the two resulting PDF files for those who do not have arabtex.




%% The environment translit
% ArabTeX handle utf-8 characters by its own and does not use (is not  
compatible with)
% the inputenc package that appeared later. To use it we must enclose  
it in a shell that will
% let the engine treat characters as raw LATIN characters and make  
ArabTeX do the whole
% processing.
\XeTeXinputencoding "bytes" % with version 0.996 OK
{\end{RLtext}\ifxetex\XeTeXinputencoding "bytes"\else 

% We use Gentium thanks to XeTeX but we get transliteration thanks to  

Let's try some text to begin with.

% Now some transliterated Arabic text with utf-8 encoding
% Notice that if we use ArabTeX ASCII (LATIN) input encoding we do  
have no problem
% In the actual situation, I even get some quite good results  
combining this macro with
% ledmac and ledpar (I didn't touch yet ledarab, which should be  
easily adapted to the
% situation of Arabi
الحمد للّه على ما أنعم، وله الشكر على  
ما ألهم، والثناء بما قدّم، من عموم نعم  
ابتداها، وسبوغ آلاء أسداها، وتمام منن
أولاها، جمّ عن الإحصاء عددها، ونأى عن  
الجزاء أمدها، وتفاوت عن الإدراك أبدها،  
وندبهم لاستزادتها بالشكر لاتّصالها،
واستحمد إلى الخلائق بإجزالها، وثنى  
بالندب إلى أمثالها، وأشهد أن لا إله  
إلاّ اللّه وحده لا شريك له، كلمة جعل  
تأويلها، وضمّن القلوب موصولها، وأنار  
في التفكّر معقولها، الممتنع من الأبصار  
رؤيته، ومن الألسن صفته، ومن الأوهام
كيفيته، ابتدع الأشياء لا من شيء كان  
قبلها، وأنشأها بلا احتذاء أمثلة  
امتثلها، كوّنها بقدرته، وذرأها  
بمشيّته، من غير
حاجة منه إلى تكوينها، ولا فائدة له فـي  
تصويرهـا، إلاّ تثبيتاً لحكمته،  
وتنبيهاً على طاعته، وإظهاراً لقدرته،  
لبريّته وإعزازاً لدعوته، ثمّ جعل  
الثـواب على طاعته، ووضـع العقاب على  
معصيته، ذيادة لعباده عن نقمته، وحياشته
لهـم إلـى جنته.


I attach below the PDF files obtained with pdfeTeX and XeTeX


-------------- next part --------------
A non-text attachment was scrubbed...
Name: xetex-arabtex-utf8-trans.pdf
Type: application/pdf
Size: 28326 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20080116/db5865a9/attachment-0002.pdf 
-------------- next part --------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pdftex-arabtex-utf8-trans.pdf
Type: application/pdf
Size: 17557 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20080116/db5865a9/attachment-0003.pdf 
-------------- next part --------------

More information about the XeTeX mailing list