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




class Show a where
  show :: a -> String


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.

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Related: tex.stackexchange.com/a/33041/21891
    – jub0bs
    Commented Aug 13, 2013 at 11:00
  • Standard CM fonts does not include boldface tt
    – daleif
    Commented Aug 13, 2013 at 11:11
  • 1
    Just add \usepackage{lmodern}.
    – Mensch
    Commented Aug 13, 2013 at 14:26
  • Do you want the keywords in bold typewriter font or just bold? Commented Aug 13, 2013 at 15:57
  • Both in typewriter and bold
    – M.B.
    Commented Aug 14, 2013 at 10:16

1 Answer 1




in the preamble.


You must log in to answer this question.

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