If I specify a lineskip
in lstlisting
, it affects the caption too. How can I prevent it?
Example:
\documentclass[a5paper]{article}
\usepackage{listings}
\begin{document}
\begin{lstlisting}[float,
basicstyle=\ttfamily\footnotesize,
lineskip=-0.7ex,
columns=fixed,basewidth=0.5em,
captionpos=b,
caption={Long caption text that spans at least two lines to show the lineskip.}
]
one
two
three
\end{lstlisting}
\begin{lstlisting}[float,
basicstyle=\ttfamily\footnotesize,
%lineskip=-0.7ex,
columns=fixed,basewidth=0.5em,
captionpos=b,
caption={Long caption text that spans at least two lines to show the lineskip.}
]
one
two
three
\end{lstlisting}
\end{document}