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:
\documentclass{article}
\usepackage{lipsum}
\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage[spanish,mexico,es-noshorthands,es-noindentfirst]{babel}
\usepackage[tracking=true,protrusion=true]{microtype}
\setmainfont{STIXTwoText}
\setmathfont{STIXTwoMath}
\begin{document}
\lipsum[1]
\[ \alpha, \sum, \int \]
\end{document}
Thanks everyone!
iftex
to your lines and wrapping the simplest doc around it gives no problems for me using TeXLive 2022.STIX Two Text
andSTIX Two Math
, which are the font names as shown byfc-list
on Linux.