I'm forced to use a commercial (Univers) font in my presentations, which obviously does not contain a dedicated \minus sign, which is called by siunitx. (Though I'm not sure if it is \minus or something else.) So if I'm typing
\SI{-1984}{m^{-42}}
I don't get any minus displayed. Unfortunately I didn't found any free font with the same behaviour. But I hope you understand what I mean.
How can I include the missing minus sign from another font into my text font to get siunitx to work properly?
Here is a MWE:
\documentclass{beamer}
\usefonttheme{professionalfonts}
\usepackage{siunitx}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmainfont{Univers 45 Light}
\setmathfont{XITS Math}
\setbeamerfont{normal text}{family=\rmfamily,series=\normalfont}
\AtBeginDocument{
\usebeamerfont{normal text}
\sisetup{detect-all}
\sisetup{math-rm=\mathrm, text-rm=\rmfamily}
\sisetup{per-mode=fraction,fraction-function=\sfrac}
}
\begin{document}
\begin{frame}
The dash - is working. But the minus sign in \alert{siunitx} (e.g. \SI{-1984}{m^{-42}}) isn't, apart from when it is used in math-mode (e.g. $\SI{-1984}{m^{-42}}$). But in text I'd like to use my text font.
\end{frame}
\end{document}
giving me the output:

I don't have the problem with other fonts.
I tried various things, the first two gave me syntax errors:
\setmainfont[\minus="2212]{XITS Math}
or as I'm used to do for the math font:
\setmainfont[range={="2212}]{XITS Math}
And I found this code as well,
\newunicodechar{"2212}{{\fontspec{XITS Math}"2212}}
\newunicodechar{\minus}{{\fontspec{XITS Math}\minus}}
\newunicodechar{-}{{\fontspec{XITS Math}-}}
none of them working.
Any more suggestions?
The font I used does contain the character \char"2013 but it doesn't contain \char"2212 but it appears to me that this is the one called by siunitx when the minus is typed.
egreg's suggestion
\usepackage{newunicodechar}
\newunicodechar{^^^^2212}{\char"2013}
works for the unit
\SI{-1984}{m^{^^^^2212 42}})
but doesn't for the number, as ^^^^2212 it is an invalid numeric character.
--U+2013 – David Carlisle Apr 30 '15 at 12:00--instead of-in your text, which is all I was suggesting) – David Carlisle Apr 30 '15 at 12:05Misplaced sign token '--1984'– Robert Seifert Apr 30 '15 at 12:08\SIinstead of the hyphen, you can do with\newunicodechar{−}{\ifmmode–\else --\fi}. There are two U+2212 in the code; explicitly,\newunicodechar{^^^^2212}{\ifmmode ^^^^2212\else --\fi}– egreg Apr 30 '15 at 12:12\SI{-1984}{m^{^^^^2212 42}})but for the number part is considered an invalid numeric character. – Robert Seifert Apr 30 '15 at 12:27\SI[parse-numbers=false]{...}{...}? – egreg Apr 30 '15 at 12:34