Relevant to those:

I'm trying to change the font at math-mode:
If it's with "s": \setmathsfont - it doesn't compile, if it's without the "s: it's doesn't change the font...

Here is MWE:






The output is:
enter image description here

Can you help to understand how to change the font at math-mode?

Thank you!!

  • 4
    you can not use Arial as the main math font using unicode-math, \setmathfont requires an OpenType Math font (that is the font has an internal MATH table giving math typesetting layout parameters) – David Carlisle Nov 9 '19 at 13:42
  • 1
    Arial is a text font, not a math font. – Mico Nov 9 '19 at 13:45
  • 1
    And \setmathsfont is defined by the mathspec package, but not the unicode-math package. – Mico Nov 9 '19 at 13:52
  • Thank you all for your answers!! @DavidCarlisle - Those fonts are good? tug.org/FontCatalogue/mathfonts.html – heblyx Nov 9 '19 at 13:55
  • 1
    there is this answer but that;s 2014 more are available now it could be updated.... tex.stackexchange.com/questions/219392/… – David Carlisle Nov 9 '19 at 14:12

If you want to change it in one section, and be able to change back, declare a math version.


\defaultfeatures{Scale = MatchLowercase}
\setsansfont{Fira GO}
\setmathfont[version=sans]{Fira Math}

Then in the document:


If you want to be able to use Arial letters with your math font, but do not need to switch between different math fonts, use the range= option.

\setmathfont{Fira Math}
\setmathfont[range=it]{Arial Italic}
\setmathfont[range=bfup]{Arial Bold}
\setmathfont[range=bfit]{Arial Bold Italic}

Alternatively, you can load mathastext.

Unfortunately, the range= and version= options of \setmathfont do not work together (as of 2019}, so you cannot switch to and from a math version with Arial letters.

  • And it must be something with math support ? I.e, from here: tug.org/FontCatalogue/mathfonts.html – heblyx Nov 30 '19 at 12:44
  • @heblyx That’s a list of legacy 8-bit fonts. You wouldn’t use them with unicode-math, but you could load them with mathspec. – Davislor Dec 1 '19 at 5:59
  • @heblyx A font that you use with \setmathfont[version=... must have OpenType math support. A math font that you load with \setmathfont[range=... need only contain whatever glyphs are in that range. – Davislor Dec 1 '19 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.