How can I set the space between a listing (lstlisting) and text that surrounds it? Is there a parameter I can set at the beginning of my document, that controls this? I tried framesep, but it just inflates the frame box.
EDIT:
text
\addvspace\medskipamount
\begin{lstlisting}
...
\end{lstlisting}
\addvspace does what I need. How do I set this at the beginning of the document, so I don't have to add this manually to every listing?
EDIT:
I use listings like so:
\begin{lstlisting}[caption={cap},label=lbl]
...
\end{lstlisting}
Where cap and lbl are different captions/labels, so they are not constant for all listings.
\addvspace\medskipamount? Don't understand your question really well though. Or maybe a\vskip5pt. Is this a horizontal space or vertical space? – azetina Aug 26 '12 at 19:42\newenvironmentor a\newcommandlike\newcommand{\mylist}[1]{\addvspace\medskipamount \begin{lstlisting} {#1} \end{lstlisting}}– azetina Aug 26 '12 at 19:49listingsprovidesaboveskipandbelowskip, both of which are\medskipamountby default. You could increase this using\lstset{aboveskip=\bigskipamount, belowskip=\bigskipamount}in your document preamble. – Werner Aug 26 '12 at 20:04