Problem with fancyvrb and optional environment argument
- From: "kai@xxxxxxxxxxx" <kai@xxxxxxxxxxx>
- Date: 19 Jun 2006 04:18:54 -0700
I have the following sample code where I use Verbatim within an
environment with an optional argument:
\documentclass{book}
\usepackage{fancyvrb}
\newenvironment{dialogue}[1][Label]{
#1
\VerbatimEnvironment
\begin{Verbatim}
}
{\end{Verbatim}}
\begin{document}
\begin{dialogue}
Line 1
Line 2
\end{dialogue}
\end{document}
This fails with:
! FancyVerb Error:
Extraneous input `Line 1' between \begin{dialogue}[<key=value>] and
line end
..
\FV@Error ... {FancyVerb Error:
\space \space #1
}
If I change the call to \begin{dialogue}[Label] then the code works.
I've tried tracing macros, but I can't figure out what's wrong.
Anyone else have an idea why the optional argument breaks the code?
.
- Follow-Ups:
- Re: Problem with fancyvrb and optional environment argument
- From: Donald Arseneau
- Re: Problem with fancyvrb and optional environment argument
- Prev by Date: Re: Inline images
- Next by Date: Re: sciposter
- Previous by thread: Inline images
- Next by thread: Re: Problem with fancyvrb and optional environment argument
- Index(es):
Relevant Pages
|