I'm trying to make a newcommand to print verbatim text using the \detokenize as follows:
\newcommand{\texcmd}[1]{%
{\color{red!70}{\texttt{\detokenize{#1}}}}
}
When I use it to typeset a long command like \texcmd{\newcommand{\cmd}{def}}, it produces extra spaces as shown
How can I get rid of those unwanted spaces?
