How do I control how much vertical space appears before and after a verbatim environment?
With the following source (run through pdflatex):
\documentclass[varwidth]{standalone}
\begin{document}
text before verbatim
\begin{verbatim}
some verbatim text
\end{verbatim}
text after verbatim
\end{document}
I get the following:

I would like to be able to tweak things to get the following behavior:

Edit:
I would also like the solution to work for verbatim environments in a list item:
\documentclass[varwidth]{standalone}
\begin{document}
\begin{itemize}
\item text before verbatim
\begin{verbatim}
some verbatim text
\end{verbatim}
text after verbatim
\end{itemize}
\end{document}


verbatimtext, you can always use\ttfamilyor\texttt{...}and then have the regular paragraph skip between the lines. – Werner Feb 03 '12 at 21:30