[Tex/LaTex] Which typewriter font fits to Linux Libertine and supports bold letters

boldfontslibertinetypewritertypography

I'm thinking about using the Linux Libertine font (\usepackage{libertine}) in my next TeX documents. For listings with syntax highlighting I will need a typewriter font that supports boldface.

I used to use Courier (\usepackage{courier}), but a big disadvantage is, that the Courier font clashes with Linux Libertine.

So my question is: Is there typewriter font, supporting boldface, that does not clash with the Linux Libertine font?

Best Answer

The Open Type Version of Libertine has also a typewriter version. However, for pdflatex you can use the Bera Mono:

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\usepackage[scaled=0.83]{beramono}

\begin{document}
This is a test with \texttt{some \textbf{bold} typewriter text}.

\end{document}

enter image description here

If you want Bera Mono for LuaTeX or XeTeX then use

\setmonofont[Scale=0.83]{Bitstream Vera Sans Mono}

The TrueType font is available from http://ftp.gnome.org/pub/GNOME/sources/ttf-bitstream-vera/1.10/ A survey of monotype fonts is here: http://www.codeproject.com/Articles/30040/Font-Survey-42-of-the-Best-Monospaced-Programming