diff --git a/src/wip/code/code.pysty b/src/wip/code/code.pysty index 50facf2..9ede12e 100644 --- a/src/wip/code/code.pysty +++ b/src/wip/code/code.pysty @@ -7,15 +7,18 @@ __NEW_IF__(pipe,false) \catcode`_=13 \let_\_ \catcode`_=8 -\newcommand\code{ - \begingroup - \catcode`_=\active - \code@impl -} -\newcommand\code@impl[1]{ - \texttt{#1} - \endgroup -} + +\ExplSyntaxOn +\NewDocumentCommand{\code}{m} + { + \tl_set_rescan:Nnn \l_tmpa_tl + { + \char_set_catcode_active:N _ + } + { #1 } + \texttt{ \tl_use:N \l_tmpa_tl } + } +\ExplSyntaxOff \newif\ifactive\activefalse __IF__(pipe)