[texhax] Problem creating new environment based on verbatim

James Smith james.smith at aleph-one.com
Tue Sep 18 22:51:32 CEST 2007


Hey all,

I've dozens of verbatims, all with fancy formatting which may change in
time, so I want to encapsulate the formatting in a new environment. I
have...

+++

\usepackage{fancyvrb}

\newenvironment{myverbatim}%
{%
\begin{table}[h]
\begin{Verbatim}[fontsize=\scriptsize,frame=single,framerule=0.2pt,frame
sep=1em]	% !!
}
{%
\end{Verbatim}
\end{table}
}

\begin{document}

\begin{myverbatim}
blah
blah
blah
\end{myverbatim}

\end{document}

+++

...but this won't work, since anything after the !! line is interpreted
as part of the Verbatim environment, and therefore the new environment
is never properly defined (or so my hazy reasoning goes).

Is there a way around this?

Kind regards,

James

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.487 / Virus Database: 269.13.22/1015 - Release Date:
18/09/2007 11:53
 



More information about the texhax mailing list