I'm using listings
package, and I've added basicstyle=\ttfamily\footnotesize
. However, when I do that, the keywords from the embedded source-code are not bold anymore.
I figured that \ttfamily
together with \bfseries
does not work.
And then I found a FAQ about bold-extras, and I tried adding \usepackage[bold-extras]
, and it didn't work either. What does that package do? Should I just ignore it and move on?
And then I finally found Using bold/italic text inside listings?, which may be a duplicate to this one, but was a lot harder to find. I also found Bold Typewriter Type fonts, which got me more confused.
So, what should I do in order to get a bold fixed-width font for use within listings
?
Using pdflatex
from texlive-2010.
lmodern
should be ok.\usepackage{lmodern}
, maybe with the optionlighttt
for better distinction between medium weight and boldface letters in typewriter type. Or\usepackage{beramono}
, for example, that provides a boldface variant.