I have some listings in my beamer presentation. Sometimes, the last line of the code I want to explain doesn't fit on the slide. I've already configured the font size to scale .7
:
\newfontfamily\listingsfont[Scale=.7]{DejaVu Sans Mono}
\lstset{basicstyle=\listingsfont}
Is there a possibility to reduce the line spacing in a listing as well?
Best Answer
To reduce the space between lines, you can invoke
\linespread{<x>}
in the value passed to thebasicstyle
key, where<x>
is a number smaller than 1, as in this answer by egreg. Don't abuse it, though.