7

How can I use the default LaTeX typewriter font along with a Sans Serif libertine font?

\documentclass{article}
\usepackage[margin=1in,headheight=5\baselineskip,headsep=1\baselineskip,includehead]{geometry}


\usepackage[scaled]{libertine} 
\renewcommand*\familydefault{\sfdefault}
\usepackage[T1]{fontenc}

\usepackage{sectsty} 
\sectionfont{\sc\sectionrule{0pt}{0pt}{-5pt}{0.5pt}}

\usepackage{lipsum}

\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{test1}
\chead{test2}
\rhead{\texttt{[email protected]}}

\begin{document}
\section*{My Section Heading}
\lipsum

\end{document}

The typewriter font in the output PDF does not match with the rest of the document and actually looks weird, as shown in the following picture (a magnified version of the picture is also illustrated).

enter image description here

1 Answer 1

9

You just need to add the option mono=false (or tt=false) to

\usepackage[scaled, mono=false]{libertine} 

This is described at the libertine documentation:

Use the mono=false (or tt=false) option to suppress activating LibertineMono.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .