latex3 / unicode-math

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

Font selection of minus sign only working with `range = { \minus, "2212 }`, but not with `range = { "2212 }` or with `range = { \minus }` #626

Open jasperhabicht opened 6 months ago

jasperhabicht commented 6 months ago

Description

It seems that the font for the minus sign can only be selected, if both \minus and "2212 are selected via the range option, such as range = { \minus, "2212 }. If only "2212 or only \minus are selected, the font does not change.

Add info or delete as appropriate:

Minimal example demonstrating the issue

If you change range = { \minus, "2212 } in the below MWE to range = { "2212 } or to range = { \minus } the font is not selected as expected:

\documentclass{article}
\RequirePackage[silent]{fontspec}
\setmainfont{Times New Roman}
\RequirePackage{unicode-math}
\setmathfont{STIX Two Math}
\setmathfont{Times New Roman}[ 
    range = { \minus, "2212 } 
]

\begin{document}

-6 and $-6$ 

\end{document}

Further Details

It might be the case that this behaviour is intended, but it is at least not documented in the manual.