Hi Pierre, On Wed, May 13, 2020 at 7:34 AM Pierre Dupond <76nem...@gmx.ch> wrote: > > \RequirePackage{expl3} > \ProvidesExplPackage {test} {2020-05-12} {1.0} > {to test some commands} > > \RequirePackage{fontspec} > \RequirePackage{unicode-math} > \tl_const:Nn \c__test_MathFont_tl {Asana-Math} > \tl_const:Nn \c__test_MathFontSpec_tl {Extension=.otf,} > > \exp_args:Noo\setmathfont{\tl_use:N \c__test_MathFont_tl} { [ \tl_use:N > \c__test_MathFontSpec_tl ] }
\tl_use:N doesn't fully expand with one expansion step, so you have to use e or x (f could also be used, but that might consume a space at the head of the token list). With \exp_args:No \cmd { [ \tl_use:N \c_some_tl ] }, the \expandafter will hit the [, and do nothing at all. x or e expansion will also do the trick here: \exp_args:Nxx \setmathfont { \tl_use:N \c__test_MathFont_tl } { [ \tl_use:N \c__test_MathFontSpec_tl ] } or \use:x { \setmathfont { \tl_use:N \c__test_MathFont_tl } [ \tl_use:N \c__test_MathFontSpec_tl ] } Phelype