I have the following set up for my listings :
\lstset{basicstyle=\footnotesize,breaklines=true}
\lstset{framextopmargin=50pt,frame=bottomline}
I would like to change the font family to Courier
. How can I enable this?
fontsformattinglistings
I have the following set up for my listings :
\lstset{basicstyle=\footnotesize,breaklines=true}
\lstset{framextopmargin=50pt,frame=bottomline}
I would like to change the font family to Courier
. How can I enable this?
Best Answer
With
\usepackage{courier}
in your preamble you can use the courier font in the listings as follows:The
\usepackage{courier}
in the preamble causes\ttfamily
to produce output in the courier font. Without including this package, you can still use\ttfamily
to get a mono spaced font by including that as part of thebasicstyle=...
setting.