New answers tagged

2

As @Symbol 1 suggested in a comment, changing the catcode of % before the argument is absorbed is essential. And then making sure it is changed back when done, is equally essential. \documentclass{article} \newcommand{\code}{\catcode`\%=12 \codeaux} \newcommand\codeaux[1]{\texttt{\detokenize{#1}}\catcode`\%=14} \begin{document} \code{%>%} Test% if these ...


Top 50 recent answers are included