% Verbatim mode in which $ (math mode) and _ (subscripting) work as
% usual.  Unfortunately, if either of these characters need to be
% used in other ways, then this code won't be satisfactory.
 
\begingroup \catcode `|=0 \catcode `[= 1
\catcode`]=2 \catcode `\{=12 \catcode `\}=12
\catcode`\\=12 |gdef|@xmverbatim#1\end{mverbatim}[#1|end[mverbatim]]
|endgroup

\def\mverbatim{\@verbatim \catcode`\$=3 \catcode`\_=8
   \frenchspacing\@vobeyspaces \@xmverbatim}
\let\endmverbatim=\endtrivlist
