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

share|improve this question
add comment

2 Answers

up vote 14 down vote accepted

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

share|improve this answer
add comment

Inconsolata fits well with Linux Libertine, and has a bold face:

\documentclass{scrartcl}

\usepackage{fontspec}
\usepackage{xunicode}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Linux Libertine O}
\setmonofont{Inconsolata}

\begin{document}

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

\end{document}

enter image description here

share|improve this answer
add comment

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.