0

How can I get a portion of my document that uses the listings package to display in the font that is used in alltt?

Right now I have

\begin{lstlisting}[language = SAS]
proc hpsplit data = autompg2 seed = 123 plots = zoomedtree(nodes = ("0") depth = 2 
     fracprec = 2 predictorprec = 2);
  class origin cylinders;
 model mpg = cylinders displacement weight acceleration year origin;
   output out=mpgout;
    rules file = "\path\mpgrule.txt";
run;

proc means data = mpgout;
 class _NODE_;
 var MPG;
run;
\end{lstlisting}
Peter Flom
  • 1,176

1 Answers1

2

You can get typewriter font in listings with basicstyle = \ttfamily. To enable this setting globally, you can use

\lstset{basicstyle=\ttfamily}
moewe
  • 175,683