I get a non-fatal error when I run the following MWE:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode


% Choose roman font (choosing the mapping so that ``-->“, '-->’ etc.).

% Greek (not strictly necessary since I just use Gentium for both Greek and Latin).
\newfontfamily\greekfont{Gentium} % GFS Porson

% Arabic
\newfontfamily\arabicfont[Script=Arabic,Scale=1.2,WordSpace=2]{USAMA NASKH}






The error message appears twice:

 /usr/local/texlive/2017/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def:122: L
 aTeX Error: Command \XeTeX already defined.
                Or name \end... illegal, see p.192 of the manual.

Apparently there is some issue related to bidi or arabxetex, because when I comment out those lines, the error messages go away.

Question: is there away to solve the problem without removing Arabic script functionality?

  • 2
    Remove fontspec and bidi. arabxetex loads them anyway. Probably also remove xltxtra as you almost certainly don't need it. Shouldn't you be using language definitions for Arabic, as well as American? Or does xarabxetex take care of that?
    – cfr
    Jun 11 '17 at 23:48
  • 1
    fdf2alif is now deprecated.
    – cfr
    Jun 11 '17 at 23:49

@cfr's comments on my question deserve to be upgraded to the answer, which I give here:

The solution, as @cfr suggested, was to stop loading fontspec and bidi independently of arabxetex and removing xltxtra. That meant that I also had to load arabxetex before I started defining the Greek and Roman font families (since the latter require fontspec).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.