[XeTeX] aemph redefined: arabxetex and polyglossia
Juan Acevedo
juan.acevedo.juan at gmail.com
Mon Mar 26 14:14:33 CEST 2012
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