I am using libertine fonts and I would like to change the texttt command to use the cmtt font. I tried :


but it seems to switch the font for all the text coming after the texttt command. If I type before \texttt{center} after, I want only center to be in cmtt. How to do that ?


If you load the libertine package, do


With other font packages, if they don't provide a suitable option, just do


after having loaded the font package.

Redefining \texttt in the way you tried is wrong.

| improve this answer | |

Another good looking monospace font is Beramono:

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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