Following answer


I used fancyvrb to define a new verbatim environment -- I will use it to specify some font later, now I want to make it work at all.

I use the Isabelle document preparation system that generates LaTeX code from Isabelle theory files.

I have the following in root.tex in the preamble:



That file includes the generated LaTeX.

In the Isabelle theory file there is

proof (prove)
goal (1 subgoal):
 1. True 
Auto solve_direct: The current goal can be solved directly with
  HOL.TrueI: True

Now, I get the error

*** \FV@Error ... {FancyVerb Error:

*** \space \space #1

*** }


*** l.61 \end{jeditoutput} %%

Searching for the error message I have found some questions here on tex.stackexchange.com . One of them,

FancyVerb error when % at end, when using \DefineVerbatimEnvironment

suggests that a space should be added after ending jeditoutput. I tried this, even

\end{jeditoutput} %

but it did not work.


FancyVerb error for Sweave output in Beamer

suggests that in Beamer one should use the fragile option for the frame environment.

But this is no Beamer, still, it gave the hint that there is something with the enclosing environment.

Taking a look what happens under the hood, here is the jeditoutput section in the generated LaTeX file:

We have given a name for this theorem: \emph{true}. The system's output     console
displays the following message:

proof (prove)
goal (1 subgoal):
 1. True
Auto solve_direct: The current goal can be solved directly with
  HOL.TrueI: True
\end{jeditoutput} %%

The isamarkuptext environment is defined as




Having these, do you see what is causing the FancyVerb Error ?

How can I make this new verbatim environment work through the Isabelle document preparation system?

  • @egreg , what do you think? – Gergely Jul 6 '16 at 13:12

I believe you want something like this:



The \VerbatimEnvironment tells fancyvrb to look for \end{jeditoutput} as the end of the environment, rather than \end{Verbatim}. Then you can proceed to use the normal fancyvrb environment. The % prevent extra spaces from being inserted after }. In a case like this, that should only be important if you have additional code to add at the beginning or end of the environment.

  • unfortunately it does not work, I have the same error message as before. – Gergely Jul 6 '16 at 13:30
  • @Gergely If you still have %% right after the end of the environment (\end{jeditoutput} %%), you will want to remove them, so that \end{jeditoutput} is on a line by itself. – G. Poore Jul 6 '16 at 14:01

In the original answer


there is another solution


that worked in my case. I might run into problems specifying a font but the basic case works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.