无法声明乳胶环境
我尝试使用这段代码
\newenvironment{bashcommands}{\ttfamily\color[RGB]{22,22,22}\begin{Verbatim}}{\end{Verbatim}}
,但最终抛出了一个错误。然而,该错误与该命令无关,而是与我之前放置的另一个命令有关。我已经在这个网站上验证了该命令是正确的。
这是我收到的错误,以防有人想看它。
Runaway argument?
! File ended while scanning use of \FancyVerbGetLine.
<inserted text>
\par
l.136 \include{chapters/chapter2}
任何解决此问题的帮助将不胜感激。
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Verbatim 环境的使用存在限制,您应该使用“fancyvrb" 包来定义您自己的逐字环境。
There is restrictions tu use of Verbatim environmnent, you should use
\CustomVerbatimEnvironment
available in the "fancyvrb" package to define your own verbatim environments.首先,我会注释掉所有包含语句,并在简单的上下文中测试此环境的使用情况。如果你一直按 Enter 键,或者在编译时强制它进入安静模式,它会产生很多错误,但它会给你一个可读的 dvi 或 pdf(取决于你的 Latex 调用)。准确检查它与日志文件一起输出的内容应该可以让您了解正在发生的情况。
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.