Is it possible to have something like
\def\fiveorsix{5,6 OR 6,5}
So that the following works:
\documentclass{standalone}
\def\fiveorsix{5,6 OR 6,5}
\makeatletter
\newcommand{\test}[1][]{
\def\test@a{#1}
\ifx\test@a\fiveorsix
the optional argument is 5,6 or 6,5
\else
the optional argument is not 5,6 or 6,5
\fi}
\makeatother
\begin{document}
\test[5,6]
\end{document}
(obviously this does not work)
Or is there a better approach to achieve my goal?
edit: I had to update the MnWE because the first version was actually too minimal.
005,6
should also be recognized as5,6
, or should the optional argument be treated as a bunch or tokens (or characters), so that only exactly5,6
and6,5
should be recognized? What about spaces before and after the argument? – Bruno Le Floch Dec 25 '13 at 18:16dog,cat
orcat,dog
. Spaces are not relevant, I mean, it's ok if only5,6
and not5, 6
works. – Old Nick Dec 25 '13 at 18:41