
No puedo conseguir un pequeño espacio entre líneas para el entorno de código. ¿Cómo forzarlo? basicstyle=\linespread{0.8}
no cambia nada.
\documentclass[12pt, a4paper]{report}
\usepackage{listings}
\linespread{1.5}
\DeclareFixedFont{\ttm}{T1}{txtt}{m}{n}{10pt}
\lstset{
basicstyle=\ttm\linespread{0.8},
}
\begin{document}
The line spacing is perfect here.
The line spacing is perfect here too.
\begin{lstlisting}
The code has
too high
line spacing
\end{lstlisting}
The line spacing is perfect here.
The line spacing is perfect here too.
\end{document}