8

I'm using mcode package to insert into my document matlab code. I would change the default font. what command I should use to get this font?

enter image description here

Mazzy
  • 7,642

1 Answers1

4

The mcode.sty file has a "Customize here" section.

Change

\def\lstbasicfont{\fontfamily{pcr}\selectfont}

into

\def\lstbasicfont{\ttfamily}

and you'll get the default fixed width font instead of Courier. Or

\def\lstbasicfont{\fontfamily{lmtt}{\selectfont}}

that will choose the Latin Moder Typewriter font, which has also a boldface variant.

egreg
  • 1,121,712