# How should I cope with the clash between the package “xeCJK” and “mathspec”?

I wanted to configure math fonts in my document, and tried with mathspec, only to find it clashed with fontspec. For I have to use Chinese in my document, I have to load xeCJK package which automatically loads fontspec. How could I avoid such a clash?

Example:

\documentclass{article}
\usepackage{xeCJK}   % Using XeLaTeX
\usepackage{mathspec}  % Clash!

\begin{document}

\end{document}


The problem is that mathspec and xeCJK both load fontspec but while xeCJK loads it without any options, mathspec by default loads fontspec with the no-math option. That is an option clash.
To work around this you have to pass the no-math option also when loading fontspec the first time within xeCJK. This can be done by means of \PassOptionsToPackage.
\documentclass{article}