我想定义一个新命令,类似这样:
但是在LaTeX中我遇到了以下错误。
当我尝试使用它时,仍然会出现错误。
```
\newcommand{\bob}[1]{\excerpt \begin{lstlisting} {#1} \end{lstlisting}}
然后像这样使用它
\bob{abcd}
但是在LaTeX中我遇到了以下错误。
text dropped after begin of listing latex
编辑:
我尝试了以下操作:
\newcommand{\boy}[1] {{%
\begin{Verbatim} %
{ #1 } %
\end{Verbatim} }}
当我尝试使用它时,仍然会出现错误。
\boy{abc}