[Tex/LaTex] Using BW style for minted code highlighting not pure BW


I'm trying to use the minted package with bw style for JavaScript code highlighting. Under the document I added


and use highlighting like this:

\begin{minted}[fontfamily=courier, fontsize=\footnotesize]{js}
   window.variable = value;

However, the word window is still green!? The same happens, if I write new Array(), Array is also green! How can I change this?

edit: full example: I'm compiling it with pdflatex

  \begin{minted}[fontfamily=courier, fontsize=\footnotesize]{js}
    window.variable = value;

Seems like it's depending on the JavaScript Lexer and not the bw.py-style. I tried configuring it and setting each element to black, but the word window is still green!
How can I avoid the green words?


Could figure it out by myself:
I had to change the file bw.py in /Library/Python/2.7/site-packages/Pygments-1.6-py2.7.egg/pygments/styles and add further color specifications, like

Name: "#000000",
Text: "#000000",

as described in
and in

Best Answer

This appears to be a bug in minted (which I currently maintain). The development version treats style definitions in a slightly different way from the last release, and it is working correctly.

My guess is that in the old treatment of styles, style definitions could overlap somewhat in limited circumstances. Since the bw style is more minimalistic, it probably doesn't create all of the macros that some styles do. However, those macros would be created by the default style, and this was causing problems. In the development version, each style has its own completely isolated set of macros, so such conflicts aren't possible.

Related Question