Varun Madiath
Varun Madiath

Reputation: 3252

Unable to declare a latex environment

I tried using this code

\newenvironment{bashcommands}{\ttfamily\color[RGB]{22,22,22}\begin{Verbatim}}{\end{Verbatim}}

But ended up spitting out an error. The error however was not related to this command, but related to another command that I put earlier. I have verified that command to be correct on this site.

This is the error I get in case anyone wants to look at it.

Runaway argument?
! File ended while scanning use of \FancyVerbGetLine.
<inserted text> 
                \par 
l.136 \include{chapters/chapter2}

Any help with solving this would be greatly appreciated.

Thank you

Upvotes: 1

Views: 861

Answers (2)

kriss
kriss

Reputation: 24177

There is restrictions tu use of Verbatim environmnent, you should use \CustomVerbatimEnvironment available in the "fancyvrb" package to define your own verbatim environments.

Upvotes: 1

Tristan
Tristan

Reputation: 916

First, I'd comment out all of your include statements and just test the usage of this environment in a simple context. If you just keep hitting enter, or force it into quiet mode as it compiles, it will produce lots of errors, but it will give you a readable dvi or pdf (depending on your latex call). Examining exactly what it spit out along with the log file should give you an idea of what is happening.

Upvotes: 0

Related Questions