3

I've got the following problem: I want to print a listing with the listings package and lstlisting:

\documentclass{scrreprt}

\usepackage{listings}


\begin{document}

\begin{lstlisting}[language=Haskell,basicstyle=\ttfamily,keywordstyle=\bfseries]
class Show a where
  show :: a -> String
\end{lstlisting}

\end{document} 

But in the result I get, the keywords are not printed in bold font! This problem does not occur when I remove the basic style key-value-pair, but without this style, the listings look ugly.

M.B.
  • 285

1 Answers1

3

Add

\usepackage{courier}

in the preamble.

JaM
  • 73
  • 1
    Might not be the prettiest of fonts, have a look at http://www.tug.dk/FontCatalogue/typewriterfonts.html, it will tell you if a given font supports boldface – daleif Aug 13 '13 at 11:24