[XeTeX] Xetex, Latex3, unicode-math and Math font not found
Pierre Dupond
76nemo76 at gmx.ch
Tue May 12 16:00:25 CEST 2020
Hi All,
I want to use the command "\setmathfont" when the font name
is in a LaTeX3 variable.
When the name of the math font (Asana-Math.otf) is in
the LaTeX3 variable, the font is not found.
But when the name of the font is directly passed
as the parameter (instead of expanding a variable first),
the font is correctly found.
What is curious is that the name of the font seems to be correctly
recognised like it is shown in this log extract:
(/opt/texlive/2019/texmf-local/tex/latex/unicode-math/unicode-math-table.tex)))
)
kpathsea: Running mktextfm Asana-Math.otf/OT
With LuaLatex, an error message indicating that the font
is not found is displayed but after a reload of the cache
the font is found.
Any ideas?
Thanks for your help,
Best regards
Here is the code to reproduce the problem:
-----------------------------------------test.sty------------------------------------
\RequirePackage{expl3}
\ProvidesExplPackage {test} {2020-05-12} {1.0}
{to test some commands}
\AtBeginDocument{\ExplSyntaxOff}
\RequirePackage{fontspec}
\RequirePackage{unicode-math}
\str_const:Nn \c__test_MathFont_str {Asana-Math.otf}
\setmathfont{\str_use:N \c__test_MathFont_str}
%\setmathfont{Asana-Math.otf}
------------------------------------------test.tex--------------------------------------
\documentclass{article}
\usepackage{test}
\begin{document}
Some text and some math $e^{iπ}+1=0$.
\end{document}
--
Pierre Dupond <76nemo76 at gmx.ch>
More information about the XeTeX
mailing list.