# Change to libertine font except in certain parts?

I am producing my LaTeX document using pdflatex. If I want to switch my entire document to a libertine font I use :

\documentclass[11pt,a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage[margin=10pt,font=footnotesize,labelfont=bf]{caption}
\usepackage{lipsum}
\usepackage{listings}
\usepackage{libertine}
\begin{document}
\lipsum
\texttt{Hello, this is a test !}
\begin{lstlisting}
\end{lstlisting}
\end{document}


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 ?
-

For libertine/biolinum except \ttfamily:

\usepackage[tt=false] {libertine}


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

\usepackage{libertine}
\usepackage{listings}
\lstset{basicstyle=\fontfamily{fvm}\selectfont\small}

-

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.)

-
Welcome to the site. – Harish Kumar May 20 '14 at 0:03