TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
It looks like Latin Modern Mono. It should be the default monospaced font. If it's not and you have it installed and if you can use XeLaTeX/LuaLaTeX you could try adding \usepackage{fontspec}\setmonofont{Latin Modern Mono} in your preamble. – Silke Dec 6 '12 at 12:34
You might be interested in the matlab-prettifier package; see this answer. – Jubobs Apr 28 '14 at 15:31
up vote 2 down vote accepted

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





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


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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.