Path: utzoo!attcan!uunet!ogicse!mintaka!mintaka!mernst From: mernst@theory.lcs.mit.edu (Michael Ernst) Newsgroups: comp.text.tex Subject: Verbatim environment in macro argument Message-ID: Date: 9 Jul 90 20:36:47 GMT Sender: daemon@mintaka.lcs.mit.edu (Lucifer Maleficius) Distribution: comp Organization: MIT Lab for Computer Science Lines: 36 I would like to pass a macro an argument containing a verbatim environment, but when I do so, the closing brace of the argument seems to be ignored. Can someone help me out of my predicament? A simple example follows; my \foo is actually a little more complex, but this demonstrates the behavior. The file: \documentstyle{article} \begin{document} \long\def\foo#1{#1} \foo{ \begin{verbatim} bar \end{verbatim} } %% <=== This brace is getting lost \end{document} I hoped that this would give me ``bar'' in typewriter font. The actual result: Runaway argument? bar \end {verbatim} ^^M^^M\end{document}^^M ! File ended while scanning use of \@xverbatim. \par <*> &lplain test-verb.tex ? Thanks, -Michael Ernst mernst@theory.lcs.mit.edu