Using l3keys module for a command
uzibalqa
uzibalqa at proton.me
Fri Jun 27 22:22:13 CEST 2025
I'd like to understand how to use the l3keys module.
After defining a set of keys with
\keys_define:nn { mykeys } { ... }
how do I write a command that applies these keys?
For example, I have the following command:
\NewDocumentCommand {\bh} { o }
{
\tl_if_single:nF {#1}
{ \keys_set:nn {mykeys} {#1} }
}
I'm not entirely sure how to make this command accept key-value
options from the user and apply the definitions I set up with
\keys_define:nn.
Could it be explained how to properly structure such a command so that
it processes keys both from the user input and from the predefined key
set?
A minimal working example of how to define keys and use them in a command
would be important.
More information about the tex-live
mailing list.