I have two failed attempts on this after a couple of hours searching the web. The first uses
and fails with a
Missing \endcsname inserted..
The other tries to define a temporary command and use it:
but just expands to the second argument.
Thanks in advance for any help.