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?
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?
The verbatim
environment is a paragraph-making environment. Paragraph spacing depends e.g. on the amount of \parskip
defined. Also, all linefeeds within the verbatim environment will produce linefeeds in the output. Put your verbatim stuff immediately after the \begin{verbatim}
, not on the next line.
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}
% ...