Closed Bigaluca closed 1 year ago
\expandafter
only expands one step, which is rarely enough to produce a result for a an arbitrary command. I strongly suggest you look here at \NewDocumentCommand
in the current LaTeX kernel, which has a mechanism to determine if an optional argument is given or not, independent of any value.
Sorry but I can't quite understand what you mean... Could you give me an example of what you mean based on the code I wrote?
Please post a question at https://tex.stackexchange.com/ about this - this is not etoolbox
specific
To carry out checks on some parameters passed to an environment, I would need to:
Without going into the details of the context, I think the situation can be boiled down to this MWE:
Running those commands I would expect to get "a" in all but the last case. Instead, "b" is always printed.
What am I doing wrong? Is there a way to get the result I want?