0

I get the above error when I try to use my main font for the math letters. If I leave out the \sqrt[3]{2} bit, it works but gives a load of complaints about not having the OpenType feature 'Style=MathScriptScript' (+ssty) available in Calluna. (If you don't have Calluna: TeX Gyre Pagella shows the same behaviour.) What can I do?

\documentclass{article}
\usepackage{xltxtra}
\usepackage{fontspec}
\setmainfont{Calluna}%
\setsansfont{Calluna Sans}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Termes Math}
% If one ore more of the following three lines are included ...
% \setmathfont[range=\mathup/{latin,Latin}]{Calluna}
% \setmathfont[range=\mathit/{latin,Latin}]{Calluna-Italic}
% \setmathfont[range=\mathbfup/{latin,Latin}]{Calluna-Bold}
\begin{document}\noindent\LARGE 
    % ... this would still work, but fontspec will nag about missing +ssty:
    $a = -\frac{1}{2}$\\
    % ... but this won't work at all:
    $a = -\frac{1}{\sqrt[3]{2}}$
\end{document}
  • 1
    I tried the workaround suggested by Ulrike Fischer in her answer to the linked question, that is adding \setmathfont[range=\int]{TeX Gyre Termes Math} after all \setmathfont commands. It seems to work. By the way, don't load xltxtra unless you specifically need its features (which is unlikely); loading unicode-math is sufficient. – egreg Jun 25 '14 at 16:26
  • And I had to change the font (as I don't have calluna) and then the document failed completly github.com/wspr/fontspec/issues/177. – Ulrike Fischer Jun 25 '14 at 16:53
  • @egreg, yes, that works. I haven't got a clue why, but it works. Re xltxtra: in its doc it says that fontspec loads it anyway, so I got rid of that line. – Blackface Jun 25 '14 at 16:54
  • @Ulrike, that is all way up over my head. But it's good to see people who obviously know what they're talking about working on all this. – Blackface Jun 25 '14 at 17:15
  • 1
    @Blackface It's a weakness of unicode-math, that sets up some parameters based on the last declared math font. It probably should have separate \setmainmathfont and \setothermathfont, so it could take the needed parameters from the main font. – egreg Jun 25 '14 at 17:45