# Clash between verbatim and libertine

I have a document with some verbatim in it and I wanted to change the font to libertine, but this also changes the verbatim parts. Is there a way to keep the verbatim parts in computer-y font while changing the text to libertine font?

\documentclass[25pt]{article}
\usepackage{libertine, verbatim}

\begin{document}
\verb|looks odd|
\end{document}


It is not a clash! Package libertine defines all three font families roman (Libertine), sans serif (Biolinum), and mono (Libertine Mono). Do not load the Libertine mono font if you do not want that:

\documentclass[12pt]{article}
\usepackage[mono=false]{libertine}
\usepackage{verbatim}

\begin{document}
\verb|looks good|
\end{document}


However, using Bera Mono as typewriter font looks better. It also has a bold variant:

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[mono=false]{libertine}
\usepackage[scaled=0.85]{beramono}%% or 0.82
\usepackage{verbatim}
\begin{document}
Normal text \textsf{Biolinum} \verb|looks good| \texttt{bera mono}

Also available in bold \textbf{\texttt{bera mono bold}}
\end{document}


• Sorry, I think "clash" has a technical meaning but I meant it in a colloquial sense. Anyway, this looks good. Many thanks! – Flounderer Sep 24 '14 at 21:28

\documentclass[25pt]{article}
\usepackage{libertine, verbatim}
\makeatletter
\makeatother
\begin{document}
\verb|looks odd|
\end{document}


Adjust \verbatim@font to choose cmtt - the Computer Modern Typerwriter font that looks computer-y:

\documentclass{article}
\usepackage{libertine}
\begin{document}
looks good \verb|looks odd| looks good

\makeatletter
\renewcommand{\verbatim@font}{\fontfamily{cmtt}\selectfont}
\makeatother

looks good \verb|looks odd| looks good
\end{document}