1

I've installed all of TeX Live via texlive-full from the latest Debian Sid distribution. I'm using LyX as my editor, and selected XeTeX for typesetting Unicode characters with non-TeX fonts.

The issue starts when I'm looking for the font STIX Two Math on my system, according to the description of the (following) package, it should be installed by texlive-fonts-extra. I used the following fontspec instruction for XeTeX at my LyX document preamble: \setmathfont{STIX Two Math}, however, LyX replied with an error from XeTeX stating:

Package fontspec Error: The font "STIX Two Math" cannot be found.

To ensure that this error did not occur for another obscure reason (as typical with TeX), I compiled the document successfully with \setmathfont{XITS Math} instead and it worked as perfectly (I even considered dropping STIX Two Math for XITS Math because of that).

I configured my document class (which is American Mathematical Society article, or amsart that is provided by LyX) to use the XeTeX typesetting engine (since I'm writing it in Hebrew), so I set the math font to be a non-TeX font (i.e. OpenType/TrueType) as well in the document settings at LyX. The package description says that it indeed provides an OpenType version of STIX Two Math that therefore should work with XeTeX:

stix2-type1 -- Type1 versions of the STIX Two OpenType fonts

So why can't LyX/XeTeX locate it? And why doesn't FontManager list it? (It does, however, list the standard XITS and STIX variants along with other TeX fonts.)

I failed (or don't know how) to locate the PDF documentation that should be provided by the texlive-fonts-extra-doc package for texlive-fonts-extra, so I ended up searching at /usr/share/doc/texlive-fonts-extra/ but I didn't find there any instructions on how to use the fonts installed by its corresponding package, except for a changelog, license notice, and another maintenance notice.

4
  • The reason I posted this question here and not on TeX.SE is because I believe that the problem I'm dealing with has to do with the packages installed by Debian, or the way that Debian places the fonts from TeX Live packages when installing them via apt. – David von Tamar Jan 22 '20 at 23:21
  • 1
    what does kpsewhere STIX2Math.otf say? – samcarter_is_at_topanswers.xyz Jan 23 '20 at 1:15
  • @samcarter, /usr/share/texlive/texmf-dist/fonts/opentype/public/stix2-otf/STIX2Math.otf. – David von Tamar Jan 23 '20 at 2:04
  • @samcarter, thank you for the hint, I used then the file name instead of the font name, and it solved my issue, so I added your approach in my answer. – David von Tamar Jan 24 '20 at 15:12
1

It turns out I had to provide the actual name of the file, and not the name of the font when loading it via fontspec as such: \setmathfont{STIX2Math.otf}.

You should also ensure you have the font installed in your system by running the shell command kpsewhere STIX2Math.otf (I wish to thank samcarter for this hint in the comment section).

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.