# [XeTeX] incompatibility with amsmath

Andrew Moschou andmos at gmail.com
Sun Aug 3 06:11:37 CEST 2008

2008/8/3 Will Robertson <wspr81 at gmail.com>

> In terms of how to fix this problem, the easiest is simply to ensure that
>
>  \AtBeginDocument{\XeTeXmathcode\-="2 \symMRM "2212}%
> }{%
>  \AtBeginDocument{%
>      \PackageError{fontspec}{%
>      }{Bad things happen when amsmath changes things behind my back.}%
>    }}%
> }{}
>

Yes, I did something very similar this morning.

> However, if you're willing to break out memoir's "\AtEndPackage" code
> (which IMO should have it's own package), you could write instead (untested)
>
> \def\define at mathminus{%
>  \AtBeginDocument{\XeTeXmathcode\-="2 \symMRM "2212}}
>
>  \AtEndPackage{amsmath}{\define at mathminus}}
>
> This would be a little bit more friendly :)

I might look into this. Right now, this code has the problem that if amsmath
is not loaded at all, then the minus is not defined!

Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20080803/bdefc2a0/attachment.html