I am writing a package in which I want to define an option myvalues in such a way that
\usepackage[myvalues={10,11}]{mypackage}
would execute \mycommand[10]{11} and
\usepackage[myvalues=11]{mypackage}
would execute \mycommand{11}.
I know how to define an option with just one value using xkeyval package
\DeclareOptionX{myvalues}{%
\mycommand{#1}%
}
but I am not sure how to extend it to behave as described above with two arguments.
myvalues=[10]11might be simpler to implement and to use. – egreg Dec 27 '17 at 07:33pgfkeyscan be used independently of PGF/Tikz, so you might have some luck with that, but I'm not sure if it natively supports multiple arguments or if it is a Tikz extension that allows you to create such keys. – Suzanne Soy Feb 09 '19 at 11:54