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 <76nem...@gmx.ch>