With TeX Live 2009, with this MWE.
\documentclass{article}
\usepackage{fancyvrb, fancybox}
\begin{document}
\begin{Verbatim}[frame=single]
auto eth0
\end{Verbatim}
\end{document}
I get the following error when compiling
Runaway argument?
auto eth0^^M \end{Verbatim}^^M^^M\end{document} ! File ended while scanning use of \Verbatim. <inserted text>
Using
\usepackage{fancybox, fancyvrb}
makes the error go away, but it is disturbing. I assume that fancyvrb
depends on fancybox
, but the packages don't handle this gracefully. This took me a while to track down. For reference, I was looking at Peter Flynn's example in http://groups.google.com/group/latexusersgroup/browse_thread/thread/c8c2e5dd1e9ff5cf
The message in question starts with
I don't understand the problem. What I wrote works in any class. Just copy and paste it into a report.
and his example has those packages loaded in that order, to be precise \usepackage{fancyvrb,fancybox,calc}
. So my question is, what is going wrong here precisely, and how can I effectively debug these kinds of issues in the future?
UPDATE: The choice between's Enrico's solution and Werner's solution was basically a tossup. I did like Enrico's identification of a problem with the fancybox
Verbatim
environment. However, I still am not clear how one can efficiently identify these problems when they crop up. If anyone has debugging tips, I'd like to hear them.
\end{Verbatim}
must start in the first column of a line\end{Verbatim}
are not allowed.:)
You literally have to pull the code apart by removing things (unnecessary packages, code or commands) in order to find the root of the problem. It's very subjective, since experience plays a big part in where to look and what to look for. For example, since load order played a part here, it definitely made me suspicious that one package might redefine a command. Completely dropping one was sufficient. Then, upon further investigation, I noticed the difference in notation, and experimented with either. Widdling it down to an MWE is always best.