I know it runs contrary to a lot of the point, but I'd like to experiment with different fonts to see which I like better. I can't seem to find any reference to a way to do this, if it's at all possible.
Edit:
I ended up using the following. It's better, but not quite to the point of what I'd like
\RequirePackage[T1]{fontenc}
\RequirePackage[scaled]{beramono}
The big problem I have is that I find the monospace fonts to be too spaced out, making text take up a lot more space on the line. If anybody has any other suggestions that would be great.
Best Answer
In the case of the
lstlisting
environment from thelistings
package, you can use thebasicstyle
key to control the font attributes for normal text in the code; some examples:Of course, these modifications are better made globally using
\lstset
in the preamble:You can also use the
columns
key to control spacing; an example showing the four available values:Again, a global setting is preferable; for example: