I am trying to get a custom syntx highlight for minted. My actual code for this style looks like this:

from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
    Number, Operator, Generic

class MyStyle(Style):
default_style = ""
styles = {
    Comment:                '#8F8F8F',
    Keyword:                '#0773BA',
    Name:                   '#AB2CA2',
    Name.Function:          '#F0C648',
    Name.Class:             'bold #0f0',
    String:                 '#36991D'

I got the template for this new style from the pygments documentation (http://pygments.org/docs/styles/), but I don't know how can I make pygment to use my style. The document says, that I need to drop it into a styles folder of my pygment package. But I can't find this folder? I am on a Ubuntu system.

  • 1
    Welcome to TeX.SX! On Ubuntu 14.04, dpkg -L python-pygments shows that the package provides the directory /usr/lib/python2.7/dist-packages/pygments/styles. This could be what you are looking for. – mvkorpel Aug 8 '14 at 9:26
  • 4
    This question appears to be off-topic because it is more about Python & Pygments than about TeX. – jub0bs Aug 14 '14 at 12:12
  • 7
    @Jubobs, I disagree, while this does involve Python and Pygments, the question does not request help on either. It requests help on how to include it in a TeX document. I actually came to this page via Google, looking for answer to this very question. But because it was closed, am I not able to do so. – Tyler Crompton Nov 12 '15 at 23:05
  • 4
    @Jubobs Likewise, with all due respect, read the top of the question again, it is clear that the OP is asking how to use the custom style with the minted package. Minted makes it very easy to use a builtin style, but it's not clear how to use a custom style. This question would get closed on SO because it would be more fitting for this site. – Tyler Crompton Nov 12 '15 at 23:12
  • 2
    Here's the answer, setup.py entry_points, see github.com/jschaf/pygments-style-goggles/blob/master/…, then you can use style=goggles in minted. The info on this was scattered, but mostly at pygments.org/docs/plugins and peak.telecommunity.com/DevCenter/setuptools – Joe Aug 30 '16 at 7:36

Browse other questions tagged or ask your own question.