# Defining a macro for showing math formula source

I would like to typeset an introduction to MathJAX/LaTeX formulae.

For that, I introduced a macro:

\newcommand{\showsource}[1]{$#1$ : \verb|#1|}


To typeset a math formula and then show its source.

But when I use it as

\showsource{\frac{1}{2}}




and it works on

\showsource{\frac{1}{2}}


(yes, the space after \frac is strange but I can live with it).