
Hier ist ein MWE des Problems, von dem ich spreche. Ich verwende den Befehl lualatex.
\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\begin{document}
\setmathfont[Path=~/texmf,
Extension=.otf,
]{xits-math}
\end{document}
Ich erhalte die folgende Ausgabe:
*************************************************
* fontspec warning: "script-not-exist"
*
* Font 'xits-math' does not contain script 'Math'.
*************************************************
*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
*
* OpenType feature 'Style=MathScript' (+ssty) not available for font
* 'xits-math' with script 'Math' and language 'Default'.
*************************************************
*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
*
* OpenType feature 'Style=MathScriptScript' (+ssty) not available for font
* 'xits-math' with script 'Math' and language 'Default'.
*************************************************
! Missing \endcsname inserted.
<to be read again>
\protect
l.8 ]{xits-math}
Ich verwende die Datei vom XITS-Github. Ich versuche, diese Schriftart zu verwenden, weil Latin Modern Math ein von mir gewünschtes Zeichen nicht hat, XITS Math aber schon, aber ich konnte überhaupt nicht herausfinden, wie ich die Schriftart erfolgreich laden kann.
Antwort1
Ich bin nicht sicher, warum Sie eine private Kopie von verwenden müssen xits-math.otf
, da es mit TeX Live verteilt wird.
Auf jeden Fall benötigen Sie \string~
:
\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont[
Path=\string~/texmf/,
Extension=.otf,
]{xits-math}
\begin{document}
$a+b=c$
\end{document}
Ich erhalte im Terminal und in der Protokolldatei
</Users/MASKED/texmf/xits-math.otf>