[XeTeX] aemph redefined: arabxetex and polyglossia

Juan Acevedo juan.acevedo at gmx.net
Wed Mar 28 12:39:48 CEST 2012

Dear all,

Presumably the countless replies to the post below mean that there is (a lot of sunny weather outside or) no solution at the moment other than creating a modified version of one of the sty files, with the "\aemph" command definition commented out. This is done and working.

Thinking that polyglossia, being larger and more general, has here seniority over arabxetex, I modified the latter. Is this right thinking? Or should polyglossia be the one to modify here?

Perhaps, Vafa, if possible, could we have something like a "no-aemph" package loading option to prevent this polyglossia clash in the future? Does this sound as the way to go? Forgive me if I'm being too simplistic here, and please enlighten me!

> Message: 1
> Date: Mon, 26 Mar 2012 13:14:33 +0100
> From: Juan Acevedo <juan.acevedo.juan at gmail.com>
> To: <xetex at tug.org>
> Subject: [XeTeX] aemph redefined: arabxetex and polyglossia
> Message-ID: <AA979EE5-F3E4-4C43-A525-892BA236B3FD at gmail.com>
> Content-Type: text/plain; charset="us-ascii"
> Hello everyone,
> When running the following minimal test file:
> -------------------------------
> %!TEX TS-program = xelatex
> %!TEX encoding = UTF-8 Unicode
> \documentclass{book}
> \usepackage{xltxtra}
> \usepackage{polyglossia}
> \usepackage{arabxetex}
> \begin{document}test run\end{document}
> -------------------------------
> compiling stops with this message:
> ! LaTeX Error: Command \aemph already defined.
>               Or name \end... illegal, see p.192 of the manual.
> Now, back in 2010 this problem came up here, when Gareth Hughes offered the solution:
> "If you remove \setotherlanguage{arabic}, polyglossia won't define \aemph."
> but this does not seem to work.
> I am using MacTeX2011, everything up to date. 
> I wonder, is there any solution around for this, other than fiddling with the package itself and saving a copy in my local texmf?
> Here is the command definition in polyglossia.sty:
> \AtEndPreamble{\@ifpackageloaded{bidi}{\newcommand*{\aemph}[1]{$\overline{\hboxR{#1}}$}}{}}
> And the arabxetex.sty version:
> \newcommand{\aemph}[1]{%
>  \edef\@tempb{\expandafter\noexpand\csname text\ax at lang\endcsname}%
>  $\overline{\text{\@tempb{#1}}}$}
> Maybe I can do a little trick in my preamble to prevent the "already defined" warning?
> Gracias mil,
> Juan

More information about the XeTeX mailing list