I'm trying to use unicode-math's \mathsfit
to set sans-serif italicised numerals in math mode. I don't want sans-serif math in general; only numerals and latin/Latin (but that works already). I use xelatex.
My MWE so far is:
\documentclass{standalone}
\usepackage{fontspec}
\usepackage{unicode-math}
\setsansfont{Arial}
\setmathfont[range=\mathsfup/{num,latin,Latin}]{Arial}
\setmathfont[range=\mathsfit/{num,latin,Latin}]{Arial Italic}
\begin{document}
$\mathsf{3} \mathsfit{3} \mathsfup{3} 3$
$\mathsf{a} \mathsfit{a} \mathsfup{a} a$
\end{document}
I know Arial is not a math font and does not have all the fancy math glyphs. I neither want nor need them. I would like to set latin characters (upper and lower case) and numerals in math mode in sans-serif using \mathsf
, \mathfsup
, and \mathsfit
. With the MWE posted above this works for \mathsf
and \mathfsup
as well as with \mathfsit
for latin characters:
unicode-math prints the following error message:
*************************************************
* unicode-math warning: "no-alphabet"
*
* I am trying to set up alphabet "sfit/num" but there are no configuration
* settings for it. (See source file "unicode-math-alphabets.dtx" to debug.)
*************************************************
I've tried to apply some pattern matching and added the following lines to unicode-math.sty, to provide the alphabet sfit/num:
\__um_new_alphabet_config:nnn {sfit} {num}
{
\__um_set_mathalphabet_numbers:nnn {sf} {it}{#1}
\__um_set_mathalphabet_numbers:nnn {sfit} {it}{#1}
}
but then I get the error:
! Missing number, treated as zero.
<to be read again>
\g__um_it_num_usv
l.7 ...=\mathsfit/{num,latin,Latin}]{Arial Italic}
Can any help me adding that alphabet? Why is it missing in the first place? Is it (generally) not needed or is it impossible?
Thank you for your answers and comments.
unicode-math
) is the result of their omission from the list of requested symbols compiled by the stix group. in traditional math and technical publishing, numerals are rendered upright in math contexts; none of the participating organizations recognized any explicit "math meaning" to italic vs. upright, hence italic numerals were considered a "font and markup" situation, which is not addressed by unicode. if you can provide published documentation of a use with explicit math meaning, this can be revisited.\setmathfontface
and use that instead of\mathsfit
.