Take the 2-minute tour ×
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.

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}
Put your code here.
\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 ?
share|improve this question

2 Answers 2

up vote 4 down vote accepted

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}
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 at 0:03

Your Answer

 
discard

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.