The extra spacing before and after verbatim makes my framed (single
line) verbatim boxes look like whole new paragraphs. In some of my
documents, I have *many* such small framed verbatim boxes so that the
visual sense of paragraphs is lost/confusing because the verbatim
spacing is about the same as my parskip.
I do have a solution that works well 99% of the time. The way I solved
this is to (1) put the verbatim inside a minipage and *then* (2)
manipulate the vspace. Since you cannot put verbatim inside a
newenvironment, I have to use atbeginend to do it for me.
It's not a pretty solution. But at least the hacks are localized while
I wait for someone to come up with a better solution. I've been
searching for a solution once every few months for a long time. So
I'll post it below since I know some people are looking for such a
solution.
% console = framed verbatim
\DefineVerbatimEnvironment%
{console}{Verbatim}
[frame=single]
% hack the vspace in console
\BeforeBegin{console}{\mbox{}\\ \begin{minipage}{\textwidth}
\vspace{3pt}}
\AfterEnd{console}{\vspace{4pt} \end{minipage} \\ }
After this you can use the "console" environment. Obviously you might
need to modify the vspace. I've already tested it at the beginning/
middle/end of paragraph for my documents (12pt, parskip 12pt).
-yihsiang