The default option allows for naked as keys which show a value as true, wonderful. I'm wondering if it's possible to allow in the opts, a way to flag setting naked as false within the key. I would propose the following:
luakeys.parse('bold, !color', {invert_flag='!'}) -> bold=true, color=false
Allowing the user to specify a prefix for a naked that sets it to false. I could see users using *-~! as potential choices, maybe a table of choices could be passed as an alternative, or string with multiple characters for options.
As more high level concept, I wonder about the idea of 'embellishments' where the existence of the flag could be used to modify the key and value to a user's custom function.
The xparse package has these so-called embellishments; https://mirror.its.dal.ca/ctan/macros/latex/contrib/l3packages/xparse.pdf
The default option allows for naked as keys which show a value as true, wonderful. I'm wondering if it's possible to allow in the
opts, a way to flag setting naked as false within the key. I would propose the following:luakeys.parse('bold, !color', {invert_flag='!'})->bold=true, color=falseAllowing the user to specify a prefix for a naked that sets it to false. I could see users using
*-~!as potential choices, maybe a table of choices could be passed as an alternative, or string with multiple characters for options.As more high level concept, I wonder about the idea of 'embellishments' where the existence of the flag could be used to modify the key and value to a user's custom function.
The
xparsepackage has these so-called embellishments; https://mirror.its.dal.ca/ctan/macros/latex/contrib/l3packages/xparse.pdf