LaTeX lstlisting not highlighting keywords when basic style is ttfamily
Posted
by Lex
on Stack Overflow
See other posts from Stack Overflow
or by Lex
Published on 2010-03-25T11:47:25Z
Indexed on
2010/03/25
11:53 UTC
Read the original article
Hit count: 533
Hello,
I'm working on a LaTeX document and using lstlisting to display my Java source code. My setup looks like this:
\lstset{
basicstyle=\ttfamily,
keywordstyle=\bfseries,
language=Java,
frame=single,
aboveskip=11pt,
belowskip=11pt,
breaklines=true,
breakatwhitespace=false,
showspaces=false,
showstringspaces=false
}
The keywords are not highlighted bold when using ttfamily, but if I use small or don't specify the basic style, they're highlighted fine.
What am I missing?
© Stack Overflow or respective owner