Include the following code into your document after having loaded
Now you'll be able to controll the spacing around the
Soutput environments by using the following two lengths:
Both act quite similar most of the time, more details can be found in the
fancyvrb documentation on page 46.
To kill all extra spacing between the environments, use
If you want to reduce the spacing without removing it completely, set
\fancyvrbpartopsep to the desired value, e.g.
Sweave.sty is based on
fancyvrb, which uses a
list to display its contents and to control margins and spacing. (Actually, it's a bit more complicated, as
fancyvrb uses a mixture of rewritten parts of the
list code in the LaTeX kernel and the original macro calls.) The appearance of lists can be controlled by
In this special case, only the values
\partopsep as described above are important. You cannot, however, simply set these values e.g. in the preamble as they are overwritten by the class-specific default values (stored in
\@listii, ...) when a new list is created.
Instead, you have to hook into the
fancyvrb code after these changes have been made, which can be done by adding the necessary code to