TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 am producing my LaTeX document using pdflatex. If I want to switch my entire document to a libertine font I use :

\texttt{Hello, this is a test !}
Put your code here.

Two questions (using pdflatex) :

  • How to switch all fonts to libertine except \ttfamily
  • How to switch all fonts to libertine (including \ttfamily) except in all listings ?
share|improve this question
up vote 4 down vote accepted

For libertine/biolinum except \ttfamily:


For always libertine except listings which uses in this example Bera Mono:



share|improve this answer

To switch all fonts to libertine except \ttfamily, use the tt=false option to the libertine package. (I don't know how to set the default font for listings.)

share|improve this answer
Welcome to the site. – Harish Kumar May 20 '14 at 0:03

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.