
次のコードを考えてみましょう。
\documentclass{article}
\usepackage{listings}
\NewDocumentCommand{\hey}{v}{\lstinline|#1|\ignorespaces}
\begin{document}
\hey|a |b
\lstinline|a |b
\end{document}
v
なぜこのようなことが起こるのでしょうか? -type 引数はスペースを尊重するはずです(入力は「逐語的」であるため)。それとも、定義内で使用することが何らかの理由で許可されていない (定義内で が禁止されている\lstinline|
のと同様) ことが理由でしょうか?\verb