简体   繁体   中英

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

使用Verbatim环境存在限制,您应使用“ fancyvrb ”包中提供的\\CustomVerbatimEnvironment定义您自己的逐字环境。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM