[XeTeX] Package conflict

Ulrike Fischer news3 at nililand.de
Sat Jun 11 14:51:30 CEST 2011


Am Sat, 11 Jun 2011 21:28:58 +0900 schrieb Nathan Camillo Sidoli:

> There seems to be a conflict with the loading order of packages mathspec 
> and arabxetex, which both require amsmath.
> 
> The mathspec package will ask for amsmath to be loaded first, but the 
> arabxetex will load amsmath because it needs the \overline macro.

actually arabxetex only ask for amsmath, it will not load it if has
been already loaded.
 
> 
> The mathspec package must be loaded first, because it will call in 
> fontspec, which must be loaded before arabxetex.
> 
> If arabxetex is loaded after mathspec, however, irregardless of whether 
> or not amsmath is loaded, I get the following error:
> 
> ----
> 
> (/usr/local/texlive/2010/texmf-dist/tex/xelatex/arabxetex/arabxetex.sty
> 
> ! Package mathspec Error: `amsmath' must be loaded earlier than `mathspec'.
> 
> 
> Does anyone have any ideas or suggestions? (I'm using an up-to-date TeX 
> Live 2010 distribution.)


The test in mathspec is logical wrong. It hacks \RequirePackage (not
a good idea anyway at my opinion) to throw an error if its argument
is "amsmath" but it doesn't disable this hack if amsmath has been
loaded correctly before mathspac.

mathspec should better test at the begin of the document if amsmath
has been loaded after mathspec and then throw an error.

You can disable the wrong test like this:

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathspec}
\makeatletter
%\let\RequirePackage\original at RequirePackage %uncomment
\makeatother
\usepackage{arabxetex}


\begin{document}
abc
\end{document}

-- 
Ulrike Fischer 



More information about the XeTeX mailing list