latex3 / unicode-math

XeLaTeX/LuaLaTeX package for using unicode/OpenType maths fonts
http://ctan.org/pkg/unicode-math
LaTeX Project Public License v1.3c
243 stars 28 forks source link

range=\mathit conflicts with \mathversion #264

Open spl opened 10 years ago

spl commented 10 years ago

I would like to change the \mathversion, but it seems like the option [range=\mathit] is overriding my command. See the following minimal example:

\documentclass{minimal}
\usepackage{unicode-math}

% Default math font
\setmathfont{XITS Math}

% Math version 'arial'
\setmathfont[version=arial]{Arial}

\begin{document}
\(XITS\) % OK

{\mathversion{arial}\(Arial\)} % OK

\(XITS\) % OK

% Set a new \mathit range
\setmathfont[range=\mathit]{Comic Sans MS}
\(Comic Sans MS\) % OK

% This should be Arial:
{\mathversion{arial}\(Comic Sans MS\)} % BAD!
\end{document}

Note that I actually encountered the problem with \setmathfont[range=\mathit]{...} in the preamble, which affected the entire document. Also, I had other ranges set (\mathup, \mathbf, \mathbfup, \mathcal, and various Unicode ranges), but \mathit was the only contributor to the problem.

unicode-math version: 2013/05/04 v0.7e

spl commented 10 years ago

Related: #255.