I am using Texstudio with miktex and lualatex, both of which I downloaded yesterday. I had a file that compiled perfectly on overleaf, but here a thousand errors pop up when I try to run the code. These are the messages I get: "Package fontspec Error: The font "STIXTwoMath" cannot be found. \fi" , "Font \TU/STIXTwoMath.otf(0)/m/n/10=[STIXTwoMath.otf]:mode=base;language=dflt; at 10pt not loadable: metric data not found or bad. \fi", "Package fontspec Error: The font "STIXTwoText" cannot be found. \setmathfont".

My best guess is that the font names change between Overleaf and TexStudio (or Miktex? I don't really understand what is what, sorry about that), but I do not know where to check the list of the full catalogue of fonts and their names in each editor.

Here is a sample code that does not compile:



    \[ \alpha, \sum, \int \]

Thanks everyone!

  • 1
    Dear friend welcome to SE! To be able to help you best just make a minimal example 10-12 lines reproducing your issue, so we can compile it and find what your issue is. We cannot compile the snapshot you posted.
    – miltos
    Jan 6, 2023 at 7:28
  • Adding iftex to your lines and wrapping the simplest doc around it gives no problems for me using TeXLive 2022.
    – daleif
    Jan 6, 2023 at 9:55
  • 1
    For me it works both as is, and if I put spaces in STIX Two Text and STIX Two Math, which are the font names as shown by fc-list on Linux.
    – frabjous
    Jan 6, 2023 at 10:00
  • I think I should say I'm working on windows, maybe the font names vary from linux and mac, to windows Jan 6, 2023 at 16:51

1 Answer 1


hopefully this will be useful to someone in the future. The reason the error popped up is because, using windows and miktex, Stix fonts are not installed by default. They need to be installed separately from the official link: https://www.stixfonts.org/

Once installed, everything compiled correctly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .