1

I have a fairly minimal document:

\documentclass[]{article}
\usepackage{minted}
\usemintedstyle{github}

\begin{document}

\begin{minted}{java}
public static void main(String[] args) {
    System.out.println("Hello world");
}
\end{minted}

\end{document}

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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.