tags:

views:

30

answers:

2

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

A: 

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.

Tristan
+1  A: 

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

kriss
Any chance this would work with \colorbox as well?colorboxes always give me trouble.
Varun Madiath