[XeTeX] ArabXeTex: XeTeX or XeLaTex?

Fr. Michael Gilmary FrMichaelGilmary at MaroniteMonks.org
Fri Dec 25 01:11:35 CET 2009


@@ wrote:

> 1) When I try to compile it as a file XeTeX, I have the following error:
> Undefined control sequence: \documentclass{article}
>   

That's because \documentclass is for XeLaTeX (not XeTeX). Don't try to 
compile it with XeTeX, just use XeLaTeX.


> 2) When I try to compile it as a file XeLaTeX, the command \texroman
> does not work:
>
> ! Undefined control sequence.
> l.24 ...abiyaT ma`a kalimaT inklIziyaT (\textroman
>                                                   {English}).	
>   

Try \textrm instead.

> ?
> [1
> And in the pdf output the word English is written in Arabic.
> Without this command the file is compiled correctly.
> Any help?
> Regards
> P.-S : Monsieur F. Charette, si vous me lisez, vous pourriez m'écrire
> en privé (mon anglais est loin d'être parfait). Merci.
>   


You can try the following --- I've modified some of your input and added 
to it (although some of the glyphs didn't come through correctly, 
nevertheless, it works).

\documentclass{article}
\usepackage{bidi}
\usepackage{xltxtra}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{arabic}
\usepackage{arabxetex}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.2]{Scheherazade}
\setmainfont{Times} % or your favorite

\begin{document} \LARGE
This is some text in English with Arabic insertion \textarab{`arabI}.
Comme quoi \c{c}a marche !
This is some text in English with Arabic insertion
\textarab[utf]{عربي}.Texte UTF non vocalis\'e !
This is some text in English with Arabic insertion
\textarab[voc]{`arabI}.Texte vocalis\'e !
\begin{arab}\LARGE
bism al-lahi al-ra.hmani al-ra.hIm
\end{arab}
\begin{arab}
wa-ha_dihi fiqraT"uN bi-al-`arabiyaT ma`a kalimaT inklIziyaT.
\end{arab}
\begin{arab}[utf]
وهذه فقرةٌ بالعربية مع كلمة انكليزية.
\end{arab}
\begin{arab}
wa-ha_dihi fiqraT"uN bi-al-`arabiyaT ma`a kalimaT inklIziyaT
\textrm{(English)}.
\end{arab}
\end{document}


I think that should fix most of the trouble. (And your English is far 
better than my French ... let alone Arabic!)

Joyeux Noël!


-- 
United in adoration of Jesus, 



fr. michael gilmary, mma

Most Holy Trinity Monastery
67 Dugway Road
Petersham, MA 01366-9725





More information about the XeTeX mailing list