Too much whitespace after verbatim command

latex

If I put the following LaTeX code:

\begin{singlespace}
\begin{verbatim}

There is too much whitespace before the text inside those tags appear. It looks like there are two line breaks. Is there a way to reduce this whitespace?

Best Answer

Many environments put some default surrounding space around their contents. The correct way is most likely to find out how the variable that determines this space is called and modify it (temporarily, or for the whole file). For a quick and dirty fix, however, you can just use some negative vspace:

Lorem ipsum...

\vspace{-1ex}

\begin{strangedays}
% ...
Related Topic