I want to define a command \mydef that does something like this:
\mydef{\foo{bar}}
produces
\def\foo{bar} \verb|\foo=bar|
The command:
\newcommand{\mydef}[1]{\def #1}
does the first bit, but I don't seem to be able to use verbatim in a command - how do I access the contents of #1? In this context I would be happy if I could just discard the first character...
\of\foo, or thebofbar? – Martin Scharrer♦ Mar 26 '11 at 15:52barreally be read verbatim or do you only want to display it so, but keep it normal for the definition of\foo? – Martin Scharrer♦ Mar 26 '11 at 15:54