I have a fairly minimal document:



public static void main(String[] args) {
    System.out.println("Hello world");


I've installed the github Pygments style with sudo pip2 install pygments-style-github.

$ pygmentize -L styles | grep git
* github:
Port of the github color scheme.

And yet, when I compile the document, the colours used in the syntax highlighting are the same as if the \usemintedstyle{github} command was missing:

I can print out the CSS rules for the style using pygmentize -S github -f html without any problems, which makes me think the style is installed correctly. Other built-in styles such as "borland" work correctly.

What am I doing wrong?

1 Answer 1


This was solved by deleting the _minted-a/ directory and recompiling.

The root cause of the problem was an attempt to use a style with a numeric name prior to the MRE presented in the question. Due to macro restrictions, styles with names including an integer cause the style to fall back to the default one.

You must log in to answer this question.

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