I'm trying to create an alias for the verbatim environment like this:
\newcommand{\vb}[1]{\begin{verbatim} #1 \end{verbatim}}
So I can use it like this:
\vb{
word.
}
But when using it, I get this error:
! Missing $ inserted.
<inserted text>
$
l.93 \end{verbatim}
Where line 93 is the end of a verbatim environment I used after later down the file after closing the \vb
. If I replace all verbatim
environments with the \vb
syntax, then I get this error:
Runaway argument?
zip([],B) = case ([],B) of ([],_) => [] | (_,[]) => [] | (x::L,y::R\ETC.
! File ended while scanning use of \@xverbatim.
<inserted text>
\par
So it seems like the \vb
is not closing the environment correctly? How do I get this to work ? The end goal is to get a \vb
command that I can use like I described above, and bonus points if I could indent the stuff in the \vb
command by a few mm.
fancyvrb
documentation.\Verb
variant in Fancyvrb.\vb
is not closing the environment correctly" is absolutely correct. Tokens are scanned in search of\end{verbatim}
and is never found.