Tag Info

New answers tagged

8

You need to separate out the choice of the : and _ syntax of L3 from the functionality. The following uses a much smaller expansion library than xparse (just 7 lines of code) but it implements the n (no expansion) x (full \edef expansion) and o (expand once \expandafter) expansion types. Rather than define variant macro names with :nnx suffixes, just ...


4

It's easy with expl3: \input expl3-generic \def\arga{what} \def\argb{how} \ExplSyntaxOn \cs_new:Npx \zh_cmda: { \arga\argb } \cs_new:Npn \zh_cmdb:nn #1 #2 { \str_if_eq:nnTF { #1 } { what } { \msg_term:n{\#1~is~`what'} } { \msg_term:n{\#1~isn't~`what'} } \str_if_eq:nnTF { #2 } { how } { \msg_term:n{\#2~is~`how'} } { ...



Top 50 recent answers are included