I am using lstlisting
to show some code in my PDF. The problem is that when I use:
basicstyle=\fontfamily{pcr}\selectfont\footnotesize\color{red},
to change the code color (not only the language keywords), the frame color changes too.
What I want to achive is to have the source code all red and the frame black.
Here my lstset
:
\lstset{
language=C++, % choose the language of the code
basicstyle=\fontfamily{pcr}\selectfont\footnotesize\color{red},
keywordstyle=\color{black}\bfseries, % style for keywords
numbers=none, % where to put the line-numbers
numberstyle=\tiny, % the size of the fonts that are used for the line-numbers
backgroundcolor=\color{darkgray},
showspaces=false, % show spaces adding particular underscores
showstringspaces=false, % underline spaces within strings
showtabs=false, % show tabs within strings adding particular underscores
frame=single, % adds a frame around the code
tabsize=2, % sets default tabsize to 2 spaces
rulesepcolor=\color{gray}
captionpos=b, % sets the caption-position to bottom
breaklines=true, % sets automatic line breaking
breakatwhitespace=false,
}