考慮以下程式碼:
\documentclass{article}
\usepackage{listings}
\NewDocumentCommand{\hey}{v}{\lstinline|#1|\ignorespaces}
\begin{document}
\hey|a |b
\lstinline|a |b
\end{document}

為什麼會發生這種情況?我希望v
-type 參數能夠尊重空格(因為輸入是“逐字記錄”)。或者是我在定義中使用的原因\lstinline|
在某種程度上是不允許的(類似於\verb
在定義中被禁止的事實)?