[Tex/LaTex] Beamer: Using sans serif numbers in math mode together with LuaLaTeX and the fontspec package

beamerfontsluatexmath-mode

This is a follow up on my last question. I want to produce a beamer presentation using the font Helvetica Neue. I am using this MWE:

\documentclass[]{beamer}

\usepackage{fontspec}
\setsansfont[
  BoldFont=HelveticaNeueLTCom-Md,
  ItalicFont=HelveticaNeueLTCom-LtIt, 
  SmallCapsFont=TeXGyre Heros,
  SmallCapsFeatures={Letters=SmallCaps},
]{HelveticaNeueLTCom-Lt}

\begin{document}

\begin{frame}{Test 1 2 3}

\begin{itemize}
\item \textit{italic}
\item \textbf{bold}
\item normal
\item numbers: 1, 2, 3 and 4
\item math
\begin{align}
a^2 + b^2 &= c^\text{2} \text{ (used \texttt{\textbackslash text} to produce sans serif 2 for $c$)}\\
\alpha^2 + \beta^2 &= \gamma^2
\end{align}
\item \textsc{SmallCaps}
\item Dash -- Dash
\end{itemize}

\end{frame}

\end{document}

With the following result:

enter image description here

  1. How do I change the font with is used for numbers in math mode? I can use \text all the time but this is not a clever solution.
  2. Is the code ok that way? I didn't use the \usefonttheme{professionalfonts} beamer command because I think this is not useful in my case.
  3. The dash -- does not work. How can that be fixed?
  4. The SmallCaps font look too thick in combination with the thin main font. Has anybody a suggestion for a better SmallCaps replacement? I looked here http://www.gust.org.pl/projects/e-foundry/tex-gyre/ and it also says that

TeX Gyre Heros can be used as a replacement for a popular font Helvetica


Update

Following Mico's advice leads to missing greek letters such like \alpha and \beta. I removed the greek and Greek option but the letters are still missing:

\setmathfont[range=\mathup/{latin,Latin,num}]{HelveticaNeueLTCom-Th}
\setmathfont[range=\mathit/{latin,Latin,num}]{HelveticaNeueLTCom-ThIt}
\setmathfont[range=\mathbfup/{latin,Latin,num}]{HelveticaNeueLTCom-Roman}
\setmathfont[range=\mathbfit/{latin,Latin,num}]{HelveticaNeueLTCom-It}

enter image description here

The warnings in the log file look like:

*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
* 
* OpenType feature 'Style=MathScript' (+ssty) not available for font
* 'HelveticaNeueLTCom-ThIt' with script 'Math' and language 'Default'.
*************************************************
luaotfload: font no 25 (HelveticaNeueLTCom-ThIt) does not define feature ssty fo
r script latn with language dflt
luaotfload: no font with id 25
*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
* 
* OpenType feature 'Style=MathScriptScript' (+ssty) not available for font
* 'HelveticaNeueLTCom-ThIt' with script 'Math' and language 'Default'.
*************************************************

Using \usefonttheme{professionalfonts} or not does not have an effect on the output (as far as I can see).

Best Answer

try

\usepackage[no-math]{fontspec}
\usepackage{unicode-math}
\setsansfont[
  BoldFont=HelveticaNeueLTCom-Md,
  ItalicFont=HelveticaNeueLTCom-LtIt, 
  SmallCapsFont=TeXGyre Heros,
  SmallCapsFeatures={Letters=SmallCaps},
]{HelveticaNeueLTCom-Lt}
\setmathfont{HelveticaNeueLTCom-Lt}
\setmathfont[range=\mathit/{greek}]{TeXGyre Heros Italic}