verbatim

Matthew Fluet fluet@CS.Cornell.EDU
Mon, 12 Mar 2001 19:16:18 -0500 (EST)


I've settled on the following, which is producing acceptable results.  If
the verbatim really is the beginning or end of the paragraph, use an
\aaTop or \aaBot to add extra space.  

\newcommand{\aaTop}{\vspace{2\topsep}}
\newcommand{\aaBot}{\vspace{2\topsep}}
\newcommand{\zzTop}{\vspace{-2\topsep}}
\newcommand{\zzBot}{\vspace{-2\topsep}}
\newenvironment{tightverbatim}
               {\zzTop\verbatim}
               {\endverbatim\zzBot}

I settled on \topsep, because it seems to the the ACM's zelous use of
\@topsepadd\topsep in the definition of trivlist that results in all the
extra space.  I think a judiciously placed \zzTop between a theorem and
proof should close the gaps there.  Also, before and after an itemize.
Sometimes it seems like you need two, but I wouldn't do this.  The fact
that the inter-paragraph spacing is a rubber length means that even after
a \zzTop, TeX might decide to keep the paragraphs separate.